Keep Leading Zeros

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
jyoung
Posts: 694
Joined: Thu Jan 21, 2016 6:43 am
Location: Oklahoma City, OK USA

Keep Leading Zeros

Post by jyoung »

Is there a way to keep leading zeros?

I have a signed (9) field the represents a DUNS number, it has an edit mask of ' - - '.

The first part of some numbers is 00, which gets stripped off. For example the number 00-999-9999 is displayed as " 999-9999" instead of "00-999-9999".

I've heard about EditWord support http://vlforum.lansa.com.au/viewtopic.php?f=3&t=1161 that I thought may help, but I can't seem to find any info it, specifically how to format a value.
billcross
Posts: 30
Joined: Thu Apr 07, 2016 3:01 am

Re: Keep Leading Zeros

Post by billcross »

If you place a 0 in the tenth position of your edit word that might do it. The zero represents the last position that zero suppression is to stop so by putting it in position 10 of a 9 digit field all leading zeros should show.
jyoung
Posts: 694
Joined: Thu Jan 21, 2016 6:43 am
Location: Oklahoma City, OK USA

Re: Keep Leading Zeros

Post by jyoung »

Thanks Bill.

I was able to make it work by using '0**-***-****' where the * is a space.
Post Reply