PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → [5.5] Test for blank with input mask
[5.5] Test for blank with input mask
Débuté par Al, 22 juin 2003 07:03 - 1 réponse
Posté le 22 juin 2003 - 07:03
G'day All
I have a text field with a mask of "999.99"
On the screen it displays as "___.__"
If I want to test it for blank in the exit code, I have to actually test if it equals "___.__" as
If myself <> "___.__"
do something
End
I find it quite bizarre that the input mask inserts itself as the returned value for a screen field.
I would like to test the field as IF nospace(myself) = ""
Because then I don't have to know anything about the mask but because of the input mask I have to be very precise in testing for blanks on masked fields and if I ever change the mask I also have to remember to change the exit code test.
Anyone have any other ideas on testing masked fields for blank entry
Regards
Al
Posté le 22 juin 2003 - 11:28
G'day All
I have a text field with a mask of "999.99"
On the screen it displays as "___.__"
If I want to test it for blank in the exit code, I have to actually test if it equals "___.__" as
If myself <> "___.__"
do something
End
I find it quite bizarre that the input mask inserts itself as the returned value for a screen field.
I would like to test the field as IF nospace(myself) = ""
Because then I don't have to know anything about the mask but because of the input mask I have to be very precise in testing for blanks on masked fields and if I ever change the mask I also have to remember to change the exit code test.
Anyone have any other ideas on testing masked fields for blank entry
Regards
Al

Hi Al,
Unless I am missing something here, the mask means that it must only have numeric digits as input,
so a blank field will evaluate to zero. Therefore why not test it for zero?
hth,
Clive