Date not populating on alert

Anonymous
Not applicable

Re: Date not populating on alert

pastedImage_0.png

Thanks for jumping in  Sanford Whiteman Did I set up the script wrong?

pastedImage_0.png

Anonymous
Not applicable

Re: Date not populating on alert

Marketo support is working on it, they cant seem to figure it out yet.

SanfordWhiteman
Level 10 - Community Moderator

Re: Date not populating on alert

This is telling.  You got the script as right as you could, but that parsing error is about the space in the field name.

Try manually replacing the spaces with underscores:

     ${Lead.Styling_Session_Date}

if that doesn't help, also try

     ${Lead.StylingSessionDate}

Also pls show a screenshot of Field Management for that field.

Anonymous
Not applicable

Re: Date not populating on alert

pastedImage_0.png

Hi Mate here is the screen

SanfordWhiteman
Level 10 - Community Moderator

Re: Date not populating on alert

If you write to me off-line, I'd like to try something else using Velocity as a debugging tool.

Also, what are your results from Velocity with the underscores inserted vs. with a known-nonexistent field?

SanfordWhiteman
Level 10 - Community Moderator

Re: Date not populating on alert

You don't have to be a dev for this test -- just create a new Email Script {{my.token}}, substituting your lead field for Matthew's of course.

Then add the new {{my.token}} to the email.

Anonymous
Not applicable

Re: Date not populating on alert

Thanks for the help Sanford

underscores or %20 (html ascii code for space) breaks the token and the email doesnt validate.

But good insights into the spaces been an issue.

SanfordWhiteman
Level 10 - Community Moderator

Re: Date not populating on alert

Doesn't validate?  An unrecognized variable shouldn't do that.  Try it with:

     ${Lead.Some_Random_Field_Name_XYZpdq123}

That should validate and send fine (the email will have the literal text "${Lead.Some_Random_Field_Name_XYZpdq123}").

%20 is the URL-encoded representation of a space character (HTML-encoded is  ) -- neither of these would ever work in a Velocity variable.

Anonymous
Not applicable

Re: Date not populating on alert

With you now

The field doesnt populate still for me. I'll see if support comes back with anything

SanfordWhiteman
Level 10 - Community Moderator

Re: Date not populating on alert

So when you put the random (nonexistent) field, with underscores, in the Velocity script, what happens? Does it validate? But with your actual field with underscores, it doesn't validate? These would be important findings to share w/support even if they are not solutions.

The fact that the field doesn't appear with underscores when you drag it into the Velocity Editor from the tree on the right is a big one.