Focal Point
passing leading spaces from data-entry page

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/9941018331

November 24, 2004, 07:33 PM
CarolAllain
passing leading spaces from data-entry page
Is there a simple way to keep the leading zeros on an amper var being passed from a data-entry page?

-*if I do it this way:
-SET &X1=' FORD';

TABLE FILE CAR
PRINT *
WHERE MODEL EQ '&X1';

provides me with what I need:
WHERE MODEL EQ ' FORD';

but if I key-enter the same result in my data-entry page, then it eliminates the preceding spaces, which I do NOT want.

Thanks,
Carol
November 25, 2004, 01:42 PM
<Pietro De Santis>
You may try using JavaScript to convert the blanks in your form objects to something else (underscores, for example) and then in your fex, convert them back to blanks.
November 26, 2004, 06:09 AM
susannah
CArol, i just had this very problem myself, and on this board, "Rolland" gave me the answer. (read thread # 911)
Use the FTOA function. ("floating point to Alpha")
It works for my forms like a charm.
Even works for a variable of all zeros.
read your &IN = '000' or as all blanks from your form.
-SET &OUT = FTOA(&IN,'(F3L)','A3');
Now, your post said 'leading zeros' and then talked about 'leading blanks'...and your example doesn't have any leading blanks because this html board will nuke extra spaces..so i'm not sure if you want leading zero control or leading blank control. leading blanks are harder. Post back to us if you need help on blanks.