I have this Email Template in Salesforce that is capturing information from the lead based on IF Statement conditions.
I understand that in order to use formulas on Email Templates I have to use the regular formula inside curly brackets "{!}".
I have 2 fields for this matter:
Field 1: It's a checkbox field - API = Quote_Request_Upholstery_Cleaning__c
Field 2: It's a regular number field (with 1 Decimal point) - API = Quote_No_Bedrooms_HC__c
The condition is as follow: If Field 1 is checked, show Field 2 value. If NOT checked, show nothing.
{!IF(Lead.Quote_Request_Upholstery_Cleaning__c = TRUE, Lead.Quote_No_Bedrooms_HC__c,'')}
Very straight forward, right? At least that's what I thought. This formula seems to work fine with regular text fields but not with number fields. It will not show the values at all. When I use the regular merge field {!Lead.Quote_Request_Upholstery_Cleaning__c}
it shows the value without any problems.
Anyone to tell me what seems to be wrong here? I'm attaching an image showing the formula. It's a fairly large template with many IF Statements with the same issue. It will work with regular text fields but not with number fields. I feel like if I solve this issue, I'll solve them all. Any help with this issue will be greatly appreciated. Thank you so much.
= true
is unnecessary; (2) did you try wrapping the decimal fieldname with theTEXT(..)
function?relatedTo
isn't used; but your suggestion is good