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
Sabrina Oliveira 3Sabrina Oliveira 3 

Can I get the label value instead of API Name value in a Visualforce Page?

I'm creating a simple VFP to render as PDF and I would like to get some picklist fields. The problem is that I'm getting the API Name and not the label value. There's a way to do it using only VFP?

Example of how I'm doing:
Status: <br/>{!CPRMinutes__c.Status__c}
Best Answer chosen by Sabrina Oliveira 3
Dushyant SonwarDushyant Sonwar
Sabrina,

Change
Status: <br/>{!CPRMinutes__c.Status__c}

to
Status: <br/> <apex:outputField value="{!CPRMinutes__c.Status__c}" />

It will show you the picklist label.

All Answers

AbhinavAbhinav (Salesforce Developers) 
Hi Sabrina,

Does below link answer your question?

https://developer.salesforce.com/forums/?id=906F000000097EpIAI

Thanks!
Dushyant SonwarDushyant Sonwar
Sabrina,

Change
Status: <br/>{!CPRMinutes__c.Status__c}

to
Status: <br/> <apex:outputField value="{!CPRMinutes__c.Status__c}" />

It will show you the picklist label.
This was selected as the best answer
Dushyant SonwarDushyant Sonwar
Also give FLS to the field otherwise it will not show 
Sabrina Oliveira 3Sabrina Oliveira 3
Thank you, Abhinav and Dushyant. It helped me a lot!