You are adding Velocity script: ${blahblah} is VTL.
You may not want to add any more VTL but to be clear, you are always using VTL when you use any reference like that.
Thanks. What I meant was - I was hoping that simply dragging in the field would make the token populate the value in the field. Either that isn't the case or, as you and Rajesh suggest, an email script field token doesn't render with preview. If the problem is that dragging in the field isn't sufficient to populate the token with the value in the field, can you tell me what to add to make it so?
I.e., the field name is "Tail Number." It's a text field and I want the content (the actual tail number) to populate the token.
I would suggest you send create a test Velocity token that does not rely on custom objects, which add a lot of complexity (and you need to have sample objects in order to test).
For example, simply output
${lead.FirstName}
I am not convinced that VTL now executes in preview mode. If it does, you will see the lead's first name.
Good idea. I tried that and it didn't populate. Thank you!
Just on this point, how does one iterate over an object in the scripting panel.
I just tried
#foreach ($x in {object_cList.get(0).fullName})
<li>$x</li>
#end
but couldn't figure it out quickly enough.
Oops. Obvious mistake, I have it now.
It should be
#foreach ($x in {object_cList})
<li>$x.firstName</li>
So is the live VTL execution working for you but not for Denise, even though you're both on 2.0? We have to get to the bottom of that!
Yes, absolutely.
For the benefit of anyone looking for an answer to the same situation - how to preview how a token will render for a specific recipient (only with the added wrinkle that the token is an email script token):
1) Jamie Lewis's response is correct for normal tokens - but not for email script tokens:
"Yes, this is done in the preview pane then select the view by drop down and view by a specific lead or view by a list.
If you have a test lead in your database you can just pick that lead and the email preview will populate with the lead data.
The list will just be a list of test leads that you can scroll through to see the data change. This is great to make sure the personalization is working correctly. It has to be a static list though, can't be a smartlist."
2) Sanford and Rajesh are correct the email script tokens will not render (populate) in preview.
I'm confused. I think Jamie is correct in saying that if you select the "List" or "Lead" section of the email preview, the email is constructed and you can view the preview as you intend it. This is documented:
http://developers.marketo.com/documentation/velocity-script/
"You can also use the Email Preview to test your script. To do so, you must select View As: Lead Detail, and select a lead from an available static list. This has the added benefit of outputting any exceptions that may have occurred during script execution:"