If you have any specific fields that are lengthy and are left padded with zeroes, you can save your users a lot of time by alowing them to type ONLY the right most numbers.
For example, lets say you have a field INV_ITEM_ID and the length is 18 and left padded with zeroes. The number is 000000000000123456. Your user can just enter 123456 and when they tab out of that field, you left pad all the zero's.
This can be done easily by using the following code.
If INV_ITEM_ID <> “Next” Then
&ITMIDLEN = Len(INV_ITEM_ID);
&FILLLEN = 18 - &ITMIDLEN;
If &ITMIDLEN < 18 And
&ITMIDLEN > 0 Then
&CHECKFIRST = Substring(INV_ITEM_ID,1,1);
If &CHECKFIRST <> “%”;
INV_ITEM_ID = Rept(“0”, &FILLLEN) / INV_ITEM_ID;
End-If;
End-If;
End-If;
You can use this code on any field that is left paded.