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

Filtering a display of related objects in a VF page
I am trying to pull a filted list on a VF page but am thinking that the VF pageBlockTable cannot filter properly. Is there an Apex alternative to the following code with an option that would only return records with a specified value in a specified field? Thanks
<apex:page standardController="Account" > <apex:pageBlock > <apex:form > <apex:pageBlockTable value="{!account.Contracts}" var="Contract"> <apex:column headervalue="Contract Number"> <apex:outputLink value="https://na2.salesforce.com/{!Contract.id}" target="_top" id="theLink">{!Contract.contractNumber}</apex:outputLink> </apex:column> <apex:column value="{!Contract.Contract_Type__c}"/> <apex:column value="{!Contract.status}"/> <apex:column value="{!Contract.ownerid}"/> <apex:column value="{!Contract.ActivatedDate}"/> </apex:pageBlockTable> </apex:form> </apex:pageBlock> </apex:page>
You could use a custom controller or an extension controller to grab the Account's contacts and filter them in Apex code.