I've been trying to render the value of a picklist field in a conditional statement where if the field is null there should not be anything rendered and is there is a value in the field then it should be rendered in the email template.

I am using a custom email template and working in HTML version here the block of code

<div Style="font-family : Roboto;">
 <p style="text-align: left">Une requête vous a été assigné. Voici les détails.</p>
 <div style="Text-Align: left;">
  <p><b>Sujet de la requête</b> : {!Case.Subject}</p>
  <p><b>Raison identifiée :</b> {!Case.Reason} </p>
  <p><b>Description</b> : {!Case.Description}</p>
  <p><b>Requête # :</b> <a Href="{!Case.Link}" Style="color: #009900" >{!Case.CaseNumber} </a></p>

 <p>Vous pouvez visionner la requête en effectuant un clic sur le numéro de requête présent dans ce courriel.</p>


What I am trying to do is having {!Case.Reason} in a conditional statement but whatever I try, as soon as I put it in the statement no value will be shown. I have looked into multiple forum and post to try to fix this but nothing is working. Here is what I have tried so far

{!IF(Case.Reason = "" , "" , Case.Reason) } 
{!IF(TEXT(Case.Reason) = "" , "" , TEXT(Case.Reason)) }
{!IF(ISPICKVAL(Case.Reason) = "" , "" , TEXT(Case.Reason)) }
{!IF(ISPICKVAL(Case.Reason, ""), "" , TEXT(Case.Reason)) } 

I also tried changing the "" value for Null and tried ISBLANK(), ISNULL()

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.