You need to sign in to do that
Don't have an account?
Aravind R
How to change apex column value on if condition?
I have an apex column as below
<apex:column value="on {!wrkf.Last_Updated_Date__c} by {!wrkf.Last_Updated_By__c}" />
But I want to print when !wrkf.Last_Updated_Date__c != null otherwise I want tp print nothing. Please help me
eg1.. On 23/01/2014 by John
eg2 (Nothing to be printed)
<apex:column value="on {!wrkf.Last_Updated_Date__c} by {!wrkf.Last_Updated_By__c}" />
But I want to print when !wrkf.Last_Updated_Date__c != null otherwise I want tp print nothing. Please help me
eg1.. On 23/01/2014 by John
eg2 (Nothing to be printed)
you have 2 solution :
solution 1 :
utilisation de rendered
<apex:column headerValue="Update BY">
<apex:outputText value="on {!wrkf.Last_Updated_Date__c} by {!wrkf.Last_Updated_By__c}" rendered="{!wrkf.Last_Updated_Date__c != null}"/>
</apex:column>
Solution 2:
<apex:column value="{!IF(wrkf.Last_Updated_Date__c != null, "on {!wrkf.Last_Updated_Date__c} by {!wrkf.Last_Updated_By__c}"", "")}" />
Regards
All Answers
you have 2 solution :
solution 1 :
utilisation de rendered
<apex:column headerValue="Update BY">
<apex:outputText value="on {!wrkf.Last_Updated_Date__c} by {!wrkf.Last_Updated_By__c}" rendered="{!wrkf.Last_Updated_Date__c != null}"/>
</apex:column>
Solution 2:
<apex:column value="{!IF(wrkf.Last_Updated_Date__c != null, "on {!wrkf.Last_Updated_Date__c} by {!wrkf.Last_Updated_By__c}"", "")}" />
Regards