Fixed number of digits in a field

Anonymous
Not applicable

Fixed number of digits in a field

I am required to pass a five digit number to our integrated system, but all of the five digit codes start with a 0. Marketo has been removing the 0 from the number and storing it as 4 digits, making my data POST to the other system fail.

Does anyone know how to fix the number of digits in a field or force Marketo to retain the 0s in a field?

3 REPLIES 3
SanfordWhiteman
Level 10 - Community Moderator

Re: Fixed number of digits in a field

Support Qs should be in Products, not Marketing Central.

The answer is you must use a string field.  Numeric fields never store a leading zero (just as someone's age isn't 0030), though they may be output with zero-padding (or anything-padding). 

String fields preserve every character.

I don't know what you're using to POST (guessing webhook) but unless you can format the output you need to use a pre-padded string.

Anonymous
Not applicable

Re: Fixed number of digits in a field

Thanks Sanford! I reformatted the field and was able to retain and POST all 5 digits! Much appreciated!

SanfordWhiteman
Level 10 - Community Moderator

Re: Fixed number of digits in a field

Great, thanks for tagging my answer.  Out of curiosity: you're POSTing using a webhook?