Service Flow Manager > Output Documents > Output Document for Admin > Business Use Cases and Solutions > Show or Hide Section Based on the Count of Detail Lines
Show or Hide Section Based on the Count of Detail Lines
You can choose to hide or display the tables in the Output Document based on the number of detail lines.
Use the following CSS class to hide the Labor section, if the number of detail lines with the Line Price Per Unit field value populated in the Labor section is three:
.hide_Table{ {{$F.IF($F.COUNTOF($D.Labor, 'SVMXC__Actual_Price2__c')==3 ,"display: none;","display: visibility;")}} }
* 
If you want to hide the Labor section in case there are no lines, then use the following code:
.hide_TableLabor{ {{$F.IF($F.COUNTOF($D.Labor) == 0 ,"display: none;","display: visibility;")}} }
The following example explains the functionality:
<div class="part-details hide_Table">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<thead>
<tr>
<th colspan="7">
Labor Details
</th>
</tr>
</thead>
</table>
* 
The COUNTOF() function can also be used to hide specific columns in the table. For example,
<th class="theader" id="hide_col" svmx-data="{{SVMXC__Actual_Price2__c}}" width="12%">
where hide_col is defined in the CSS section similar to hide_Table.
Was this helpful?