I need to display a formula field in my VFP. Survey_Summary_Form_Name__c is a formula field and I need to display it on VFP.
Here is the snippet of the code. I know that I cannot override the formula field. What method can I use to display it?
if(eventRec.Activity_Junction__c != null){
subActMasterList = [SELECT Id,
Name,
Activity_Name__c,
Survey_Summary_Form__c,
Survey_Summary_Form__r.Activity_Name__c,
Survey_Summary_Form__r.Survey_Summary_Form_Name__c,
Survey_Summary_Form__r.Inline_VF_Sort__c
FROM Sub_Activity__c
WHERE Activity_Junction__c =: eventRec.Activity_Junction__c
ORDER BY Survey_Summary_Form__r.Inline_VF_Sort__c ASC];
if(subActMasterList.size()==0){
subActMasterList= null;
}else{
for(Sub_Activity__c sa : subActMasterList){
if(sa.Survey_Summary_Form__c == null){
subActList.add(new Sub_Activity__c(id = sa.Id,Activity_Name__c = sa.Activity_Name__c));
}else{
surveyList.add(new Survey_Summary_Form__c(Id=sa.Survey_Summary_Form__c, Survey_Summary_Form_Name__c = sa.Survey_Summary_Form_Name__c ));
}
}
if(subActList.size() == 0){
subActList = null;
}
if(surveyList.size() == 0){
surveyList = null;
}
}
}
This is the snippet of VFP
<apex:pageBlockTable value="{!surveyList}" var="s" rendered="{!surveyList != null}">
<apex:column headerValue="Survey">
<apex:outputLink value="/{!s.Id}" target="_parent">{!s.Survey_Summary_Form_Name__c}</apex:outputLink>
</apex:column>
</apex:pageBlockTable>