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

Rendering outputPanel in Template where [cx.date_match_approved__c>2009-01-10T23:59:59.000Z]

The following code works if  [cx.date_match_approved__c>2009-01-10T23:59:59.000Z] is removed. 


When added, I am recieving an error that I need an additional ')'.  I can't undertsand why this would be the case.


Any ideas?




<apex:outputPanel rendered="{!AND(cx.date_match_approved__c>2009-01-10T23:59:59.000Z,cx.Status__c ='Request NDA',cx.Declined_by_Buyer__c = false)}">



Message Edited by Brian12345 on 02-21-2009 01:22 PM
Message Edited by Brian12345 on 02-21-2009 01:22 PM
Message Edited by Brian12345 on 02-21-2009 01:22 PM
There's a bug in the compiler where it gets confused on the '>' character depending on where it is placed.  Can you mess around with it?  Maybe flip the inputs and make it '<' instead?

Thank you Jill!


There may be a bug in the compiler....but using '=' '>' and '<' all result in the same error:


ErrorError: Syntax error. Missing ')'


Again...if I specifically take out the date related statement, this error goes away.


Any other ideas?




- Brian


Just curious, is it even correct to use '>' or '<' in this situation? 


If you just put this on your page:


(outside of a component or attribute entirely) what does it display?  Does it compile, or display true or false?  It doesn't seem like the date string you have up there is something that can be operated on with '>' or '<'.  If I were you I'd move the logic to my controller and use the Date object that's built into apex to do date comparisons. 


Thanks for the additional suggestions!


Unfortunately, this is for a visualforce email template, so I don't have the ability to use a controller for this functionality.  How else could I restrict the related list by date?