+ Start a Discussion

Formula Field Not Populating



I have a custom controller and visualforce page.  Long story short, one of the fields I am querying is a formula field that I would like to display on the visualforce page.  No values are displayed.  Any thoughts on how I can get the formula field to populate the value?


Here is the method from my controller:

"team_number__c" is the formula field that will not populate on the visualforce page.


public list<MyCarrier> getCarriers(){
string sortFullExp = sortfield + ' ' + sortDirection;
for(carrier__c c : database.query('select team_number__c, insurance_requested__c, load_date_time__c, date_submitted__c, lastmodifiedby.alias, id, team__c, references__c, requester__c, fraud_websites__c, Insurance_received__c, conditional_letter__c, contract__c, MC_Number__c, compliance_action__c, attachment__c, name from carrier__c where team__c != NULL order by ' + sortFullExp ))
carriers.add(new myCarrier(c));
return carriers;




This is the formula that populates "team_number__c":::

if(Team__c = "t9chop1", "Team 9", if(Team__c = "t1chop2", "Team 1",""))

Best Answer chosen by Admin (Salesforce Developers) 
Anil SavaliyaAnil Savaliya



Use this Way :


((ISBLANK(IB_Parent_ID__c)|| IB_Parent_ID__c = Null || IB_Parent_ID__c = 0) || ISBLANK(Populate_IB_Parent_Name__c) ), Populate_IB_Parent_Name__c ,Populate_IB_Parent_Name__c+" "+HYPERLINK("/apex/IBParentView?ibparent="&TEXT(IB_Parent_ID__c)&"&emplid=" &$User.EmployeeNumber ,"[View IB Parent]"))