You need to sign in to do that
Don't have an account?
Hugo Stoupe
Using "IF" Statement to evaluate a apex:column field value to decide whether or not to display
Is it possible to use and IF statement when displaying date from a LIST using apex:column. In my example below, I want to check the value of Monday_Date and if it is in a specific month, display the "Monday" field; if not, then don't display the "Monday" field.
In my Data set, there is a field called "tec.Monday_Date__c" which I don't display on the page. I would like to check the value of the "tec.Monday_Date__c" and if it equals a certain month, then display the data in the "tec.Monday__c" field; if not, then display nothing.
In psuedo-code, I would like to do this:
If (MONTH(tec.Monday_Date__c) = MONTH(tec_Start_date__c),
Then <apex:column width="10" value="{!tec.Monday__c}"/>
Else don't display the value for that column.
Is that possible?
In my Data set, there is a field called "tec.Monday_Date__c" which I don't display on the page. I would like to check the value of the "tec.Monday_Date__c" and if it equals a certain month, then display the data in the "tec.Monday__c" field; if not, then display nothing.
In psuedo-code, I would like to do this:
If (MONTH(tec.Monday_Date__c) = MONTH(tec_Start_date__c),
Then <apex:column width="10" value="{!tec.Monday__c}"/>
Else don't display the value for that column.
Is that possible?
<apex:pageBlockSection title="Billable Docket Report" columns="1" collapsible="False">Test <apex:pageBlockTable value="{!TEList}" var="tec"> <apex:column width="30" value="{!tec.Functional_Area__c}"/> <apex:column width="20" value="{!tec.Standard_Activities__c}"/> <apex:column value="{!tec.Activity_Other__c}"/> <apex:column width="10" value="{!tec.Project__c}"/> <apex:column width="10" value="{!tec.Contract__c}"/> <apex:column width="10" value="{!tec.Monday__c}"/> <apex:column width="10" value="{!tec.Tuesday__c}"/>
It's unintuitive, but you can use an apex:OutputField to acomplish this.
Try this:
All Answers
It's unintuitive, but you can use an apex:OutputField to acomplish this.
Try this:
Hugo