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
chaithaly gowdachaithaly gowda 

my visualforce page is not comparing the string values which includes '+'

Hi 
I have a visualforce page , where i need to display a text based on the picklist value .
<apex:outputPanel style="color:white"
       rendered="{!IF(Contact.Field1__c='value -WS 25 - A+',true,false)}" >
all other values are working fine except this value .
Please enlighten me if I am wrong.

Thanks
 
Best Answer chosen by chaithaly gowda
chaithaly gowdachaithaly gowda
Thanks Anudeep, but it dint work with contains as well.

But I tried using == while matching the string, and it worked.
Thanks.

All Answers

AnudeepAnudeep (Salesforce Developers) 
Hi Chaithaly, 

Can you try using the contains attribute instead? Here is an example 

rendered="{!CONTAINS(it.oppName, 'xxxxx')}"

As per this help article, rendered should work as long as the correct picklist value is used
 
<apex:inputField id="xxxif2" value="{!Object.Fieldtobedisplayed1}" rendered="{!IF(Object.picklistfieldapiname1 ='picklist value 1' || lead.Buyer_Type__c ='picklist value 2' ,true,false)}"/>

Anudeep
chaithaly gowdachaithaly gowda
Thanks Anudeep, but it dint work with contains as well.

But I tried using == while matching the string, and it worked.
Thanks.
This was selected as the best answer