11 Replies Latest reply on Apr 9, 2016 11:21 AM by 15142a9527862a8049b3391154c47bd9d731620c

    Email Script - trimming leading blank character

      This email script I created works perfectly with one exception. It returns with a leading blank character. Not sure why it does this but I imagine there is a way to trim.

       

      ##check if the Preferred Name is populated and set

          #if(${lead.Prefered_First_Name__c} != "")

              #set($birthdayfirstname = "${lead.Prefered_First_Name__c}")

      ##check if the First Name is populated and set   

         #elseif(${lead.FirstName} != "")

              #set($birthdayfirstname = "${lead.FirstName}")

          #else

              #set($birthdayfirstname = "default")

          #end  

      ##print the image name

      ${birthdayfirstname}

       

      Boom shakalaka