Activity › Forums › Salesforce® Discussions › How to use If Condition in Apex:pageBlockTable?
Tagged: Apex PageBlockTable, If Condition, Salesforce Fields
-
How to use If Condition in Apex:pageBlockTable?
Posted by madhulika shah on August 24, 2018 at 12:41 PMHow to use If Condition in Apex:pageBlockTable?
shariq replied 7 years, 8 months ago 4 Members · 3 Replies -
3 Replies
-
Hello Madhulika,
You can use the If condition in apex: pageBlockTable as follows:
{!IF(AND(field1 <condition> value, field2 <condition> value), “Show on True”, “Show on False”)}
Thanks.
- [adinserter block='9']
-
Hi Madhulika,
You can use if condition in pageblocktable:
For example:
{!IF(history.OldValue == ” && history.NewValue == ”, “Created”, “Changed history.Field from history.OldValue to history.NewValue}”)}”
Notice few things:
You should enclose the condition within {}, which seems to be missing in your code posted
You use ! with the IF and not with the field names in this case (as mentioned above)Thanks
-
Hi,
Try this –
rendered=”{! If(candidate__C.Name ==’Viru’ ,true,false) }”
Hope this helps.
Log In to reply.