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
Nirmal9114Nirmal9114 

Need to USe IF condition in HTML Email Templete

Hi,

Please help out. I have i requirement to Display a name if the record is owned by certain group of people.

This Formula is not working. i dont knwo why.

{!IF( ISPICKVAL(Opportunity.GU1__c,'GG' ), 'Global Giving Team', 'US')}

Pleas let me know where i am wroung. OR is there any other way to do it?

Thanks,
 

Prateek Singh SengarPrateek Singh Sengar
Hi Nirmal,
The formula you have mentioned is suitable for Visualforce template and not html template. Alternatively you can create a formula field on your opp object to store this value and refer that directly in your email template.

Hope this helps.
Nirmal9114Nirmal9114
Hi Prateek

I made Custom Field with this Formula:

IF(
 OR(
  ISPICKVAL(GU1__c, "GG"),
  ISPICKVAL(GU1__c, "US")
  ),
 "Global Giving Team",
 "US"
)

------
I tried this also

IF(ISPICKVAL(GU1__c,"GG"),"Global Giving Team")

But both throw this error :
Error: Incorrect parameter type for function 'ISPICKVAL()'. Expected Picklist, received Text
Prateek Singh SengarPrateek Singh Sengar
Hi Nirmal,
Is GU1__c a picklist field?