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
SazEastSazEast 

conditional render on visualforce email template

The below text should only be rendered if the picklist does not equal the two values but its not working, please could you help?
 
<apex:outputPanel rendered="{!IF(NOT(!relatedTo.Category__c ='Value1' || !relatedTo.Category__c ='Value 2' ,true,false))}> TEXT TO SHOW</apex:outputPanel>

 
Best Answer chosen by SazEast
AnudeepAnudeep (Salesforce Developers) 
Hi SazEast, 

Can you try using '==' instead of '=' like described in the example below
<apex:pageBlockSection rendered="{!Digital_Asset__c.Asset_Type__c=='Publications'}">
You can also try ISPICKVAL
rendered="{!IF(ISPICKVAL(Digital_Asset__c.Asset_Type__c, 'Publications'), true, false)}"
Anudeep

All Answers

AnudeepAnudeep (Salesforce Developers) 
Hi SazEast, 

Can you try using '==' instead of '=' like described in the example below
<apex:pageBlockSection rendered="{!Digital_Asset__c.Asset_Type__c=='Publications'}">
You can also try ISPICKVAL
rendered="{!IF(ISPICKVAL(Digital_Asset__c.Asset_Type__c, 'Publications'), true, false)}"
Anudeep
This was selected as the best answer
SazEastSazEast
Thanks Anudeep!

Its now working with this 
rendered="{!NOT(relatedTo.Category__c =='Value 1') ||(relatedTo.Product_Category__c =='Value 2'')}">