Fixed number of digits in a field | Community
Skip to main content
September 21, 2016
Question

Fixed number of digits in a field

  • September 21, 2016
  • 1 reply
  • 1653 views

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?

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

1 reply

SanfordWhiteman
Level 10
September 21, 2016

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.

September 21, 2016

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

SanfordWhiteman
Level 10
September 21, 2016

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