Can I create a custom field that is a substring of another field?

Highlighted
Anonymous
Not applicable

Can I create a custom field that is a substring of another field?

I'm interested in doing this without scripting, but I can't find a way using formulas.

GOAL: WITHOUT SCRIPTING, I'd like to use a portion of an existing field as a query string in an email link (in our case, OrderID). This OrderID already exists within the text of another field we DO already capture (the OrderURL). In short, I'd like the link to look like this:

www.blah.com/target-page?id-to-send=123456 (or www.blah.com/target-page?id-to-send={{lead.OrderID}})

Where OrderURL (an existing field) = v123456.abcdef.aaabbcc.com

And OrderID (not currently its own field) = 123456

QUESTION: Is there a way to accomplish any of the following?

  1. Create a custom field in Marketo whose value is a portion of another field (a substring function) without scripting

  2. Create the link such that the substring action is performed on the existing field (the OrderURL) within the link itself at the point of render/send (rather than having to create a persistent field)

  3. Accomplish my goal in some other way I haven't considered

Did I mention that I don't want to use scripting to accomplish this? Thanks for any guidance!

7 REPLIES 7
Highlighted
Level 6

Re: Can I create a custom field that is a substring of another field?

Short answer, no. 

Marketo currently doesn't do math in any way that I know of: which includes addition, subtraction, multiplication, division of strings, numbers, etc.

Level 10 - Community Moderator

Re: Can I create a custom field that is a substring of another field?

Your requirement of "at the point of render/send" mandates that you use an email script. That's what -- and where -- scripts are for.

Highlighted
Anonymous
Not applicable

Re: Can I create a custom field that is a substring of another field?

That's not a requirement...just one way I could think to solve the problem (for example, another way was listed in option #1).

Highlighted
Level 10 - Community Moderator

Re: Can I create a custom field that is a substring of another field?

The answer is still no, if you're averse to all kinds of scripting.

A FlowBoost script could do this in one line, then save the value in another persistent lead field. But I would never choose a FlowBoost script over a Velocity script for this case.

Highlighted
Anonymous
Not applicable

Re: Can I create a custom field that is a substring of another field?

I had no idea how easy scripting would be; I'm up and running with a scripted solution (to which I was 110% opposed). Problem solved...thanks!

Highlighted
Level 10 - Community Moderator

Re: Can I create a custom field that is a substring of another field?

OK, great.  Yes, Velocity packs a lot of power even in a couple of lines, and with more code you can do some mind-blowing customization. If you get ambitious, you can learn more via my posts at http://blog.teknkl.com/tag/velocity.

Highlighted
Level 10 - Community Moderator

Re: Can I create a custom field that is a substring of another field?

Curious about the Velocity (VTL) code you ended up using for this. Have you checked to see that the link is tracked?