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
Ralph PenceRalph Pence 

outputText True/False Statement

I'm working on a visualforce email template. I'm trying to display a textarea only if a certain checkbox is unchecked, but I keep getting a syntax error.
Here is my code:

 <apex:outputText rendered="{!IF({!cx.Activity_Completed__c}= FALSE)}"><apex:param value="{!cx.Activity__c}" /></apex:outputText>
Karthik TrainingKarthik Training
Hi Pence,

 Please change the Condition to

 <apex:outputText rendered="{!cx.Activity_Completed__c}"><apex:param value="{!cx.Activity__c}" /></apex:outputText>

Please let me know if you have any concerns.
kaustav goswamikaustav goswami
Can you please try this out?
<apex:outputText rendered="{!IF(cx.Activity_Completed__c= FALSE,true,false)}">
    <apex:param value="{!cx.Activity__c}" />
</apex:outputText>

Thanks,
Kaustav
bob_buzzardbob_buzzard
You don't need to surround cx.Activity_Completed__c in {! } as you are already in merge syntax.  You also don't need the if statement - instead you want an expression that returns true/false.  E.g.
 
rendered="{!NOT(Activity_Completed__c)}"

the above will only render if the activity_completed__c field is unchecked (i.e. has the value false).