+ Start a Discussion
lovetolearnlovetolearn 

Using "OR" operator with Rendered

Hi, 

 

I am trying to use the OR operator with the following statement:

 

<apex:inputField value="{!object__c.field__c}" rendered="{!status='Before'}"/>

 The logic is display this inputfield if the the status is before or after. 

 

Please help. 

 

Thank you 

Best Answer chosen by Admin (Salesforce Developers) 
kiranmutturukiranmutturu

confused a bit/.?

 

u want to display this inpufield if status = before or after right? then u can write like this

 

<apex:inputField value="{!object__c.field__c}" rendered="{!if(or(status='Before',status='After',true,false))}"/>

All Answers

kiranmutturukiranmutturu

confused a bit/.?

 

u want to display this inpufield if status = before or after right? then u can write like this

 

<apex:inputField value="{!object__c.field__c}" rendered="{!if(or(status='Before',status='After',true,false))}"/>

This was selected as the best answer
asish1989asish1989

Hi Love

  Try this......

 

     rendered="{!if(or(status='Before',status='After'),true,false)}"

      .......OR.....

      rendered = "{!(status=='Before'||status=='After') }"

 

 

 

 Thanks

asish

sfdcfoxsfdcfox
{!OR( Status='Before', Status='After' )}

{!CASE(Status,'Before',TRUE,'After',TRUE,FALSE)}

{! Status='Before' || Status='After'}

{!CONTAINS('Before:After',Status)}

I think there's more ways, but I'm drawing a blank.

lovetolearnlovetolearn

Thank you guys.