function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
baracudabaracuda 

ISPICKVAL formula in email template?

I need to conditionally display some text based on an Account field.  The email template is based on Case.

 

Here are two formulas I'm using:

 

  • Account- {!Account.BusinessUnitOwner__c}
  • {!IF(ISPICKVAL(Account.BusinessUnitOwner__c,'Shoes'),'YES','NO')}

 

The first formula correctly displays the Business Unit Owner field in my template.  The second formula always returns NO, regardless of the value of Business Unit Owner.  I have pasted the second formula into a custom formula field on Case, and it works correctly there.  It just won't work in the email template.

 

Can anyone offer advice on how to get this working in an email template?

Navatar_DbSupNavatar_DbSup

Hi,

I have tried your formulas and both are working Fine.

Create New template and Select “Text” as a type of Template and enter “{!IF(ISPICKVAL(Account.t_new__BusinessUnitOwner__c,'shoes'),'YES','NO')}” in Email Body and Save it . Then Click on “ Send Test and Verify Merge Fields” button and Select that account which has value “Shoes” in “BusinessUnitOwner” field and click on checkbox of Send “email preview to: “ then Click on “Ok”.

 

Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved. 

sparrowbradsparrowbrad

Hello,

 

Looking for a little help here.

 

I am trying to display a field value in an email template based on a picklist value

{!IF(ISPICKVAL(Opportunity.Partner_Sale__c,"Yes"),Opportunity.Amount_Gross__c,"")}

 

Everytime I run a test, I'm not getting a returned value when I should (using an opportunity that has the picklist field with "Yes" as value)

 

To test if my formula was wrong, I entered (and it worked)

{!IF(ISPICKVAL(Opportunity.Partner_Sale__c,"Yes"),"Yes","No")}

 

Thanks!