[SalesForce] Email Template IF Statement Formula

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?
enter image description 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.

Best Answer

It turned not being a syntax issue. Prior to posting this question, I should have thought about building a test formula field, which I ended up doing so.

The correct syntax would be:

{!IF(Lead.Quote_Request_Upholstery_Cleaning__c = TRUE, Lead.Quote_No_Bedrooms_HC__c, NULL)}
Related Topic