Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Input Mask Question
Message
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Input Mask Question
Miscellaneous
Thread ID:
00177692
Message ID:
00177692
Views:
79
I'm struggling a bit with implementing input masks. The input mask for and inventory bin location is a parameter that the user can set on the parameter screen. I am not storing the mask with the data (format = "!R" on the bin location text box class).

Now I am ready to make my reports. I expected to be able to use TRANSFORM() to apply the mask to the data, but it doesn't work correctly with character data.

a = "A-999"
b = "Z123"
?transform(b,a) ---> "Z-23"

It appears that character "spacers" in the mask (for example, a hyphen or parenthesis) only work properly when the underlying data is numeric! For example,

a = "9-999"
b = 1234
?transform(b,a) --> "1-234"

Is there any other way to put the mask on output data other than writing a UDF that scans the mask character by character and using that in my SQL statements?

I would prefer not to store the mask with the data because if you have hyphens in the mask, EMPTY(txtBox.Value) returns .F. when the control is "empty" (as the value contains the hypens). TIA.
----------
Mark Bucciarelli
Next
Reply
Map
View

Click here to load this message in the networking platform