Skip to main content
Sep 26, 2017 1:11 PM UTC
Question

Decode URI component using velocity script

Hi, is there a way do decode a URI component using Velocity Script from within the Marketo environment?

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

5 replies

SanfordWhiteman
User Group Leader
User Group Leader
Sep 26, 2017 8:03 PM UTC

Sure, easy peasy.

#set( $decodedField = $link.decode($lead.encodedField) )

Translate
Sep 26, 2017 8:16 PM UTC

Sadly, when I make a token with just the script:

#set( $decodedField = $link.decode('Daves%20Super%20Fun%20Test%20Fundraiser') )

This is the decoded field: $decodedField

Then try and send an email with it, I get the error:

An error occurred when procesing the email Rendered_Email_Velocity_Error_Area_?!

near

?
Translate
SanfordWhiteman
User Group Leader
User Group Leader
Sep 26, 2017 8:23 PM UTC

Works for me.

Did you send a real email (always use a real email to test Velocity, not a sample).

Translate