[RPG]How to avoid Zero supress

Please do not use to report errors- use your regional help desk.
Please mark posts as being for RPG or RDMLX (LANSA) developer.
To subscribe by email, display this forum, scroll to the end and select ‘Subscribe Forum’.
Post Reply
MegumiSawada
Posts: 260
Joined: Tue Feb 19, 2013 5:18 pm

[RPG]How to avoid Zero supress

Post by MegumiSawada » Thu Feb 21, 2019 12:05 pm

Hi,

Our customer would like to set a limitation for a textbox element to accept only numbers.
I have acheived it with the following code:

Code: Select all

HTML('<<TBX1>>                         
TYPE: TEXTBOX                          
DATATYPE : NUMBER                      
VALUEFORMAT.TYPE:NUMBERTEXTFORMAT      
VALUEFORMAT.SHOWSIGN:NEVER             
DISPLAYFORMAT.TYPE:NUMBERTEXTFORMAT    
DISPLAYFORMAT.SHOWSIGN:NEVER           
')  
However, it will perform zero supress automatically. So 0123 will become 123.
The customer would like to avoid this zero supress.
Is there any way to avoid it so that they can have a number with leading zero?

Best Regards,
Megumi Sawada

jasonzhou
Posts: 127
Joined: Wed Jan 11, 2017 3:26 pm

Re: [RPG]How to avoid Zero supress

Post by jasonzhou » Mon Feb 25, 2019 1:17 pm

Hi Megumi,

Currently there is no way to keep the leading zero when DATATYPE is Number.

We can add a new property to allow the leading zero in number. If it sounds ok for you, can you please submit an enhancement request to LANSA support?

Thanks
Jason

Post Reply