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
ishaan singh dhillonishaan singh dhillon 

rendered if

Hi All,

I am fairly new to apex programming and not able to figure out why the following line of code is not working for me :
<apex:outputPanel layout="panel" style="width: 100%" rendered="{IF({!Case.Type}=='Update Account')}">

The requirement is that if the value in Type piclist standard field on case object is Update account then the contect in this panel should be displayed.

Thanks in advance for your help.

Ishaan.
Best Answer chosen by ishaan singh dhillon
ishaan singh dhillonishaan singh dhillon
Hi Pradeep,

Thanks for pointing in the right direction, the following line worked like a charm :
<apex:outputPanel layout="panel" style="width: 100%" rendered="{!IF((Case.Type=='Update Account'),true,false)}">

Thanks,

Ishaan.

All Answers

pradeep kumar yadavpradeep kumar yadav
Hi Ishaan,

Try this
<apex:outputPanel layout="panel" style="width: 100%" rendered="{!IF(Case.Type=='Update Account')}">
ishaan singh dhillonishaan singh dhillon
Hi Pradeep,

Thanks for your quick reply, the change proposed by you gives the error: Incorrect number of parameters for function 'IF()'. Expected 3, received 1
ishaan singh dhillonishaan singh dhillon
Hi Pradeep,

Thanks for pointing in the right direction, the following line worked like a charm :
<apex:outputPanel layout="panel" style="width: 100%" rendered="{!IF((Case.Type=='Update Account'),true,false)}">

Thanks,

Ishaan.
This was selected as the best answer