Re: Modifying integer values to include commas

Anonymous
Not applicable

Modifying integer values to include commas

Hello,

We have a field syncing from salesforce that usually represent large numbers eg. 11,056 --> however in marketo it shows as 11056 (without the comma) - Is there a way to modify these values in marketo to display with the commas. We want to use this field as a token in an email copy and it looks messy without the comma.

Thanks

6 REPLIES 6
John_Clark1
Level 10

Re: Modifying integer values to include commas

Hi Abdallah,

As long as the field type is Integer, then it won't be able to accept the commas.  The Integer field type will only accept whole numbers.

What you could do instead is change the field type to String in Marketo.  It will then accept all characters.

To do this, you'll go to Marketo Admin > Field Management > (Search the field name) > Fields Actions (at the top) > Change Type.  The field cannot be in use when you do this, so you would need to remove it from an asset currently referencing it.  You can see those in the Used By list at the bottom of the field's information.

John

Josh_Hill13
Level 10 - Champion Alumni

Re: Modifying integer values to include commas

John,

Will this work in the sync if you pass back "11,052" as text to an integer field in SFDC? It sounds like it does, but I want to confirm.

John_Clark1
Level 10

Re: Modifying integer values to include commas

Actually, this would not work.  The integer data type is pretty much the same between Marketo and SFDC, so the field on the SFDC side would not be able to accept the commas either.  I'm guessing that there is something going on with the way the field is displayed in SFDC that's showing the commas when a user looks at the field.

Anonymous
Not applicable

Re: Modifying integer values to include commas

Hi John,

I changed the field type to 'string' but all it seemed to do was add a decimal place. Anything I am missing here - the field type in salesforce is 'number' and it is syncing to a 'string' field in marketo.

Daniela_Puizina
Level 1

Re: Modifying integer values to include commas

Sanford Whiteman‌ Hi Sanford - do you have a solution to the comma problem?

I'm trying to create this script which works but I don't know what to do about adding a comma. I can display the default value that I want to display with a comma when the value is over 25k but when it's under 25k that's where the problem occurs.

#set ($scorecap = $convert.toNumber(${lead.cap25}))

#if ( $scorecap > 25000)
$25,000
#else
${lead.cap25}

#end

SanfordWhiteman
Level 10 - Community Moderator

Re: Modifying integer values to include commas

Please open a new thread and we'll continue there. Also pls highlight your code using the Advanced Editor's Syntax Highlighter (choose Java as the language as it's the closest to Velocity).