AnsweredAssumed Answered

Script token adding an extra space

Question asked by 2f664ac2bbfb2d96d1460c5cef444bb94c0f9a57 on Nov 15, 2017
Latest reply on Nov 15, 2017 by Sanford Whiteman

Tokens thats are velocity scripts are giving me a hard time. Some are adding extra spaces after the token is added to the content of the email. The extra spaces only show up after the email is sent and are not reflected in any previews. Does anyone know how to ensure if I add a script token, the spacing before or after the token appear normal in the sent email?

 

#set($frid = ${DonationList.get(0).fundraiserID})

#set($raised = ${DonationList.get(0).donationSumNew})

#set($currency = ${DonationList.get(0).currencyChoice})

#foreach($fr in $DonationList)

#if($fr.fundraiserID > $frid)

        #set($raised = $fr.donationSumNew)

            #set($currency = $fr.currencyChoice)

            #set($frid = $fr.fundraiserID)

          #end

      #end

  #if ($currency == 'EUR')

  #set($finalLTR = '€'+ $number.format($raised))

      $finalLTR

#elseif ($currency == 'GBP')

#set($finalLTR = '£' + $number.format($raised))

    $finalLTR

#else

#set($finalLTR = '$' + $number.format($raised))

    $finalLTR

#end

Outcomes