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
Jerry ClifftJerry Clifft 

Visualforce page with Render IF/AND and Dates

This is stumping me, I am pretty sure I am close, just can't seem to get this right today.

So, render this output, if Case.Requested Action = "This" and the Case.CreateDate <= 8/4/2014. Seems simple....

<td class="Table"><apex:outputLabel value="Chewbacca " rendered="{!IF(CONTAINS(Case.RequestedAction__c, "blah blah") & !IF(Case.Requested_Actvation_Date_Time__c <= DATE(2014,8,5)TRUE,False),False)}"/></td>

Currently getting:
Error: Syntax error. Missing ')'

Any suggestions?
Best Answer chosen by Jerry Clifft
AshlekhAshlekh
Hi,

You are missing close bracket. Use below code
<td class="Table">
	<apex:outputLabel value="Chewbacca" 
		rendered="{!IF(CONTAINS(Case.RequestedAction__c, "blah blah"),if(Case.Requested_Actvation_Date_Time__c <= DATE(2014,8,5),true,false),false)}"/>
</td>

IF it helps you than please mark it as a solution and ENJOY APEX
 


All Answers

AshlekhAshlekh
Hi,

You are missing close bracket. Use below code
<td class="Table">
	<apex:outputLabel value="Chewbacca" 
		rendered="{!IF(CONTAINS(Case.RequestedAction__c, "blah blah"),if(Case.Requested_Actvation_Date_Time__c <= DATE(2014,8,5),true,false),false)}"/>
</td>

IF it helps you than please mark it as a solution and ENJOY APEX
 


This was selected as the best answer
Reinke, ChrisReinke, Chris
It looks like you are missing an & in the && logic item. You can use either AND(logic1, logic2) or logic1 && logic2.

From documentation: You can use && instead of the word AND in your Visualforce markup.
{!IF(AND(Price < 1,
   Quantity < 1),
   "Small", null)}