You need to sign in to do that
Don't have an account?
kcrawfordIMS
Visualforce email If statements with multi picklist fields
I am by no means a programmer, I've been able to hack my own code together to make VF emails work, but I can't seam to get an IF statement to work when I am using a multi picklist field... Here is the code that I'm using. that does not work.
<apex:outputText rendered="{!if(relatedTo.Lender_Condition__c == 'Photo ID' && relatedTo.Lender_Condition__c == 'Branch Signing' && relatedTo.Status_Lender_Condition__c == 'Documents Not Received' , true, false)}"> <p><li><b>Valid Photo ID</b>- Please provide a copy of Government Issued Photo ID per applicant.</li></p> <p><li><b>Branch Signing</b>- {!relatedTo.Lender__c} requires additional forms to be signed at a local branch. Once all conditions have been satisfied, a representitive from {!relatedTo.Lender__c} will contact you to arrange a convenient time for you to sign.</li></p></apex:outputtext>
What am I missing here?
I have tried it this was as well...
<apex:outputText rendered="{!If(relatedTo.Lender_Condition__c == 'Photo ID' && relatedTo.Status_Lender_Condition__c == 'Documents Not Received' , true, false)}"> <p><li><b>Valid Photo ID</b>- Please provide a copy of Government Issued Photo ID per applicant.</li></p></apex:outputtext> <apex:outputText rendered="{!IF(relatedTo.Lender_Condition__c == 'Branch Signing' && relatedTo.Status_Lender_Condition__c == 'Documents Not Received' , true, false)}"> <p><li><b>Branch Signing</b>- {!relatedTo.Lender__c} requires additional forms to be signed at a local branch. Once all conditions have been satisfied, a representitive from {!relatedTo.Lender__c} will contact you to arrange a convenient time for you to sign.</li></p></apex:outputtext>
If only one statement is true in the above code, it will work. If both are true, neither will work.
Lender_Condition__c is a Multi picklist
Status_Lender_Condition__c is just a picklist.
Use ISPICKVAL or CASE instead of IF,
https://success.salesforce.com/answers?id=90630000000gtZjAAI
Regards,
Ashish