You need to sign in to do that
Don't have an account?
acrozier
rendering based on field value
Hello,
I am trying to render datatables based on the values of two date fields matching, or not. Below is the code I am trying to use, but it doesn't work. Basically if the Start Date equals the End Date I want to populate one datatable and if not I want to populate the other.
<apex:dataTable rendered="{!IF(Job__c.Job_Start_Date__c == Job__c.Job_End_Date__c,true,false)}" style="font-family: Calibri, sans-serif; font-size: 12px" value="{!Job__c}" var="j" rowClasses="odd,even"> <apex:column > <apex:outputtext value="{0,date,MM/dd/yyyy}"> <apex:param value="{!j.Job_Start_Date__c}" /> </apex:outputtext> - <apex:outputtext value="{0,date,MM/dd/yyyy}"> <apex:param value="{!j.Job_End_Date__c}" /> </apex:outputtext> </apex:column> </apex:dataTable> <apex:dataTable rendered="{!IF(Job__c.Job_Start_Date__c = Job__c.Job_End_Date__c,true,false)}" style="font-family: Calibri, sans-serif; font-size: 12px" value="{!Job__c}" var="j" rowClasses="odd,even"> <apex:column > <apex:outputtext value="{0,date,MM/dd/yyyy}"> <apex:param value="{!j.Job_Start_Date__c}" /> </apex:outputtext> </apex:column> </apex:dataTable>
Hi,
you dont need two different datatables if you just want to hide one column.
try this:
Let me know if it does not helps.
All Answers
Can you please recheck the IF conditions?
Hi,
you dont need two different datatables if you just want to hide one column.
try this:
Let me know if it does not helps.
that worked, thank you