My token inside of the URL not displaying values | Community
Skip to main content
Level 1
October 9, 2025
Question

My token inside of the URL not displaying values

  • October 9, 2025
  • 3 replies
  • 466 views

Hi,

I'm fairly new to scripting - I'm trying to include a my token inside of my script. However, the data isn't populating. Apologies if this has already been asked previously.  

#set($equipmentName = ${my.equipment}) #set($WFID = ${my.WFID}) #set($urlBodyImage = "www.google.com/$WFID/body_image_$equipmentName") <a href="https://${urlBodyImage}"><img alt="Image" style="background-color: #ffffff; display: block; float: none; margin: 0px auto; -ms-interpolation-mode: bicubic; padding: 0px;"https://www.dummyimage.com/255x100" width="255" /></a> #end

The output I'm seeing is - https://google.com/$WFID/body_image_$equipmentName
How I want it to output - https://google.com/45689/body_image_iphone

 

Thanks! 

3 replies

Jo_Pitts1
Community Advisor
Community Advisor
October 9, 2025

@deepikachandar , 

I've edited your post to show your code as code.

There are a few problems that I can see.

  1. This line here #set($equipmentName = ${my.equipment}) doesn't need the {} around $my.equipment.  Ditto for the following line.
  2. However, your larger problem is that you can't directly access my tokens from within Velocity.  You can access object tokens (e.g. lead tokens), but not my tokens..  You'll need to use the defineburger method that was invented by @sanfordwhiteman (and used extensively by me).  If you search the nation you should find references to it.  If you need more however, let the hive mind know 🙂
  3. you seem to have an extra #end in your code.  I'm not sure if this is because you've only pasted a part of your script?

Cheers

Jo

 

 

 

 

SanfordWhiteman
Level 10
October 9, 2025

Much as I adore Velocity, I’d also wonder exactly why Velocity is being used here.

 

You can concatenate/interpolate {{my.tokens}} into URLs outside of Velocity, and it doesn’t look like you’re really manipulating the values (which would require Velocity)?

Jo_Pitts1
Community Advisor
Community Advisor
October 9, 2025

@sanfordwhiteman wrote:

Much as I adore Velocity, I’d also wonder exactly why Velocity is being used here.

 

You can concatenate/interpolate {{my.tokens}} into URLs outside of Velocity, and it doesn’t look like you’re really manipulating the values (which would require Velocity)?


@sanfordwhiteman , my best guess is that there is more going on than meets the eye - the extra #end being the potential give away to me.

SanfordWhiteman
Level 10
October 14, 2025

@deepikachandar please return to your thread and check responses.