How can I keep velocity script formatting without remapping every time? | Community
Skip to main content
New Participant
February 21, 2024
Solved

How can I keep velocity script formatting without remapping every time?

  • February 21, 2024
  • 2 replies
  • 2155 views

We are building out velocity scripts in excel and need to copy them into velocity script within Marketo. When copying from excel to marketo, we need to remap everything my dragging the fields for it to work. Is there a way to keep velocity script mapping/formatting when copying from another source? 

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

@megkart ,

OK, so your real question here is 'how can I create a token and not have to select the Marketo fields I want to have accessible to my token from the list of fields on the right hand side'. 

 

Sadly (to the best of my knowledge) there is no way around this.

 

now for MY question :).. Why on earth do you have 100+ if/then statements?  Maybe a different approach to the script is called for?

 

Cheers

Jo

2 replies

SanfordWhiteman
New Participant
February 21, 2024

Like Jo, I’m not sure how “building Velocity scripts in Excel” would be part of your workflow.

 

But merely copying and pasting new code into an existing Velocity {{my.token}} does not require re-checking the fields in the Script Editor tree. This simply is not a thing!

megkartAuthor
New Participant
February 23, 2024

We use excel since we are writing 100+ if/then statements which can be automated via excel. 

 

Every time I paste into velocity, I have to drag the fields from the right side into my script for it to work. 

Jo_Pitts1
Jo_Pitts1Accepted solution
Community Manager
February 23, 2024

@megkart ,

OK, so your real question here is 'how can I create a token and not have to select the Marketo fields I want to have accessible to my token from the list of fields on the right hand side'. 

 

Sadly (to the best of my knowledge) there is no way around this.

 

now for MY question :).. Why on earth do you have 100+ if/then statements?  Maybe a different approach to the script is called for?

 

Cheers

Jo

Jo_Pitts1
Community Manager
February 21, 2024

@megkart ,

let's step back for a moment. 

  1. Why are you coding Velocity in Excel?  How does that confer any benefit over coding in Marketo directly?
  2. What do you mean by 'remapping'?  Are you meaning field names?

Regards

Jo