function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Jessica LandismanJessica Landisman 

How do I change the label of a single field in a Field Set?

When I define a field set for a contact, I want the OwnerID>FullName label to be "Owner Name" instead of  name when I display it on a page. Is there a way to change the label of a field when I define the Field Set? If not, how do I achieve that when I display the field on a SourceForge page?

 

Currently, I am displaying the Field Set using this methodology.

 

            <APEX:REPEAT value="{!$ObjectType.Contact.FieldSets.Contact_Detail}" var="f">  
                <APEX:OUTPUTFIELD value="{!Contact[f]}">  
                </APEX:OUTPUTFIELD>
             </APEX:REPEAT>

Shashikant SharmaShashikant Sharma

Use it like this

 

 

            
                <apex:repeat value="{!$ObjectType.Contact.FieldSets.Contact_Detail}" var="f">
                     <apex:outputField value="Owner Name" rendered="{!IF(CONTAINS(LOWER(f), 'ownerid') , true , false)}" />
                    <apex:outputField value="{!Contact[f]}" rendered="{!NOT(IF(CONTAINS(LOWER(field), 'ownerid') , true , false))}" />
                </apex:repeat>
                

 I hope will work for you.