Inputmask

Here are a few special input masks that I think are worth mentioning as they are time savers.

Convert all input to uppercase:

Code:
@!

Accept alpha characters only:

Code:
@A

Accept alphanumeric:

Code:
@X

ISO date YYYY-MM-DD:

Code:
@D

Integer value with maxlength,minvalue,maxvalue:

Code:
@I10,100,1000

Double value with maxlength,maxdecimals,minvalue,maxvalue:

Code:
@F10,2,0,10000

Valid email address:

Code:
@E

Any regular expression starts with a ?. The example below validates an email address:

Code:
?\\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,4}\\b

VFP-style picture characters:

Code:
!
A
9
X

Q: 
Inputmask to “99 9999” or “99/9999″A: 
It won’t put the actual ‘/’ in using the Input mask, but you can use a ‘regular expression’ Input mask to check for the correct entry. This would be the Input mask for 2 digits followed by a slash followed by 4 digits, the ‘/’ prefix indicates the regular expression:

Code:
?[0-9]{2}/[0-9]{4}

Maybe this in combination with ‘Placeholder text’ to show the format?



(999) 999-9999 as the Input Mask
your input mask there is correct. If you enter this as a input mask on a form field it will format the data as you require.
If you have set the mask in the data dictionary make sure you have “inherit dictionary rules” set to true under “other options” for the form section.



Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s