Can a script token reference a user-set local variable inside a module | Community
Skip to main content
January 18, 2018
Question

Can a script token reference a user-set local variable inside a module

  • January 18, 2018
  • 0 replies
  • 1128 views

I am currently getting a runtime error, so I am certain I am not going about this exactly the right way.

"An error occurred when procesing the email Body!

Lexical error, Encountered: "t" (116), after : "." at *unset*[line..."

I have a local variable value set by the user (or set to a default) that I want to reference and then append to it. Is something like the following possible?

Velocity script inside the token:

#if (${summaryLink}.contains('?'))

     ##already has a param string, so append mine

     ${summaryLink}.concat('&source=')

#else

     ${summaryLink}.concat('?source=')

#end

So for example, inside the email template I want to have the script process the outputted value of the variable ${summaryLink}:

{{my.dynamicURLFormatting}}

<a href="${summaryLink}{{my.trackingToken}}">...whatever...</a>

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.