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
lil_rangerlil_ranger 

Display a number field when not null

 How do I get the second line to show if the Contract.Est_Labor_Hours__c number field is not null?  I've tried it a couple of different ways, but I can't get the line to display when there is something in there.

 

 

<apex:outputField rendered="{!IF(Contract.Est_Labor_Hours__c != null,'','display:none;')}">

Project Manager: {!ROUND(Contract.Est_Labor_Hours__c,0)}</apex:outputField>

 

Best Answer chosen by Admin (Salesforce Developers) 
Jake GmerekJake Gmerek

Output field is to dispay a salesforce field, I would try OutputText to get what you want.  It is more dymanic and lets you put a string in the value attribute which should do the trick.

All Answers

Jake GmerekJake Gmerek

Output field is to dispay a salesforce field, I would try OutputText to get what you want.  It is more dymanic and lets you put a string in the value attribute which should do the trick.

This was selected as the best answer
lil_rangerlil_ranger

It worked!  Thank you. 

 

I just had to change one other thing which was != null to == null

 

 

Jake GmerekJake Gmerek

Good deal, glad I could help!!

MANATTWebMANATTWeb

I also wanted to say thanks for this - it helped a ton!