I have a VF page related to a custom object called Equipment__c (named 'obj' in the page) as shown in the snippet below:

<apex:page controller="Reserve_Equipment" tabStyle="Equipment__c" action="{!Init}">
  <apex:relatedList subject="{!obj}" list="Equipment_Reservations__r" title="Existing Equipment Reservations" />   
  <apex:form id="form">
  <apex:actionFunction action="{!DisableLookUp}" name="DisableLookUp" reRender="form"/>
    <apex:pageBlock >
    <apex:pageBlockSection title="Reserve Equipment" columns="1">
    <apex:outputField value="{!obj.Name}"/>
    <apex:outputField value="{!obj.Equipment_Tag__c}"/>

It works fine in that it shows the Equipment_Reservations_c related list for my Equipment_c object.

But now I want to limit the records shown in this instance of the related list. On this page I only want to show records related to this equipment where Equipment_Reservations__c.Active = true and Equipment_Reservations__c.Start_Date__c >= system.today().

Since the 'subject' of my related list is actually my Equipment__c object I am not sure how I would do this.

Any help you could provide would be appreciated.

  • I fear this is not possible .You will need your own query in controller to achieve this requirement as Treckker says Commented Nov 21, 2012 at 17:27

1 Answer 1


You wouldn't be able to leverage the rendered attribute when using the apex:relatedList, you would have to render your own related list using apex:repeat or apex:dataTable, and you can then use the rendered attribute to only selectively render rows, based on the boolean condition.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .