You need to sign in to do that
Don't have an account?
Damien Ribbans
Help with evaluating an apex:outputField to yes/no.
I am new to VF and trying to display a simple field showing a contacts name and whether they have completed two questionnaires (which are stored on the contact record via a Lookup Field to the Questionnaire_Instance__c object. So far I have:
<apex:page standardController="Contact" showheader="false" lightningstylesheets="True"> <apex:pageBlock title="Participant Session Block Details"> <Apex:PageBlockSection columns="1" > <apex:outputField value="{!contact.Name}"/> <apex:outputField label="Has the start questionnaire been completed?" value="{!contact.Start_Questionnaire_Instance__c}"/> <apex:outputField label="Has the end questionnaire been completed?" value="{!contact.End_Questionnaire_Instance__c}"/> </Apex:PageBlockSection> </apex:pageBlock> </apex:page>I would like the start and end questionnaire instances to return 'Yes' if the field has a value in it, and 'No' if it is empty. How do I do that please?
Although there could be multiple ways to implement this use case one of the way I could think of is to do the checking on the object side and update two fields then you could try accessing those two fields from the contact record.
I hope this helps.
Regards,
Anutej
All Answers
Although there could be multiple ways to implement this use case one of the way I could think of is to do the checking on the object side and update two fields then you could try accessing those two fields from the contact record.
I hope this helps.
Regards,
Anutej