I'm building a html email and in a token I have a string field which has a list of up to 7 phone numbers in it, each phone number separated by a comma, e.g:
01234567, 01234567, 01234567, 01234567
I need to be able to replace the last comma in the string with ' and' instead of the comma. What would be the best way of doing it?
Solved! Go to Solution.
Your subject line seems at odds with your question — this doesn’t have to do with counting, right?
It sounds like you want to split the string into an array and then display the array in a “friendly” way.
${display.list($lead.someStringField.split("\s*,\s*"))}
Your subject line seems at odds with your question — this doesn’t have to do with counting, right?
It sounds like you want to split the string into an array and then display the array in a “friendly” way.
${display.list($lead.someStringField.split("\s*,\s*"))}
Sorry I was having issues logging in to Marketo... yep that would work, then how wold I add the 'and' before the last list item, would that involve counting them?
Sorry will do shortly, we're having heaps of issues with Marketo at the moment
@Jules1 please return to your thread to check replies.