Activity Forums Salesforce® Discussions How to use If Condition in Apex:pageBlockTable?

  • shradha jain

    Member
    August 24, 2018 at 12:44 pm

    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.

  • Parul

    Member
    September 11, 2018 at 6:15 pm

    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

  • shariq

    Member
    September 15, 2018 at 11:09 am

    Hi,

    Try this -

    rendered="{! If(candidate__C.Name =='Viru' ,true,false) }"

    Hope this helps.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos