I have a metadata field which houses a document number. As this number is used in the middle of an intelligent naming convention, we need leading 0's.
The metadata field is set up as a text field as we were unable to get the leading 0's in a number field. The constraint we have on this field is: \d{3,} as we require it to be at least a 3 digit number, though in some cases it may be longer.
When I get the value as part of my search repository function, it seems to be dropping the leading 0's as when I put this into a token calculator to give me the next incremental number, the test returns without the leading 0's.
What can I do to either retain the leading 0's or add them back in as necessary after the token calculation?