Rich's answer is spot on and what approximately what my advice also would be. However in looking at context, I think you would want to suppress this whole segment if the number is all zeros. K2 qualifier indicates a Certified Mail Tracking number. If it is all zeros it is meaningless and probably should not be sent at all. So in this case, I would have a functional map create the segment with the qualifier and the number so that if either aren't present (or in your case all padded zeros equating to not present), the whole segment would not be mapped. Not sure what transaction you are working however so would not be appropriate if the segment was mandatory of course. My 2 cents anyway.
Happy mapping!
------------------------------
Lisa Edwards
Software Engineer / Subject Matter Expert
Rainbow Data Systems, Inc
------------------------------
Original Message:
Sent: Mon December 15, 2025 01:13 AM
From: Rich McFate
Subject: Zero filled numeric field mapping as NONE when using NUMBERTOTEXT in output
Steve -- when an input field contains nothing but pad characters, as appears to be the case here, it evaluates to NONE.
So what happens next depends upon the context of the output. In the case of an ADX segment I'm looking at (5010), it comprises two required elements followed by a Ref# Composite, which is in effect two optional elements.
So if you're mapping your NUMBERTOTEXT(<input field>) into ADX01 and "K2" into ADX02, I would expect to see exactly what you're seeing. Mapping NONE into a required field will build the empty field. Mapping NUMBERTOTEXT(NONE) will still be an empty field.
If you need to see ' 000000000' in your output, I suggest:
Either(NUMBERTOTEXT(<inputField>),"000000000")
This is not in the spirit of the X12 standards, which are designed to eliminate all unnecessary characters, but I appreciate some ICs require it.
Cheers,
Rich
------------------------------
Rich McFate
------------------------------