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
------------------------------
Original Message:
Sent: Fri December 12, 2025 11:29 AM
From: Steve Arbo
Subject: Zero filled numeric field mapping as NONE when using NUMBERTOTEXT in output
v11.0.2 running on Windows 11.
Input filed is zero filled. Output field is text. The zeros don't map and the field ends up empty which results in invalid X12.
Input filed ==> 000000000
Output ==> ADX**K2 (element 2 is mandatory and I would expect zeros).
Thanks.
------------------------------
Steve Arbo
------------------------------