You need to sign in to do that
Don't have an account?

Filtering data
See page block below. I need to filter data returned based on Billing_Status__c value. What is the best way to accomplish?
Regards,
Jeff
<apex:pageBlock title="Services" > <apex:pageBlockTable value="{!Projects__c.Time_Sheets__r}" var="item" border="1" width="100%"> <apex:column value="{!item.Billing_Status__c}"/> <apex:column value="{!item.Project_Task__r.Start_Date__c}"/> <apex:column value="{!item.Project_Task__r.End_Date__c}"/> <apex:column value="{!item.Project_Task_Resource__c}"/> <apex:column value="{!item.Project_Task__c}" /> <apex:column value="{!item.Project_Task_Billing_Rate__c}"/> <apex:column value="{!item.Total_Line_Hours__c}"/> <apex:column value="{!item.Total_Line_Amount__c}"/> </apex:pageBlockTable> </apex:pageBlock>
Can you be a little more specific? Presumably by filter you mean exclude/include displayed information?
Specifically I want to include all values where Billing_Status__c = "Billed" on this page/report, excluding all other Billing_Status__c values.
I'm tempted to say use the rendered attribute on the column, but I'm not sure if that is evaluated each time through the loop or if it would be picked up first time through and thus display everything or nothing. Might be worth a try though, e.g.
If that doesn't do it, you might want to consider using a vanilla HTML table combined with an apex:repeat tag. That way you could wrap the table row in an apex:outputpanel and only render that if the status matched.
Will give 'em a go this evening and post reply on results; thanks Bob.