Copy link to clipboard
Copied
Is there a way to customize the format of a field to format like an ontario drivers license with the dashes automatically inserted - similar to how they have the option for the US social security number, but in the format of ontario drivers license so XXXXX-XXXXX-XXX
Thanks
Yes, go to field properties-> format tab -> then select 'special' -> arbitrary mask and enter 99999-99999-999
Copy link to clipboard
Copied
Yes, go to field properties-> format tab -> then select 'special' -> arbitrary mask and enter 99999-99999-999
Copy link to clipboard
Copied
Thanks! Will this also allow people to enter a letter? Oour license is a combo of letters and numbers. Will they have to type in the dash?
Copy link to clipboard
Copied
Me again, I figured my last question out - by using X where a letter is required it works properly. One last question. Is there a way to make the letter always appear as a capital?
Copy link to clipboard
Copied
In that case you may need to use a custom key stroke script or custom format script with the util.printx() method and a couple of conditions to handle an infinite number of possibilites (not the arbitrary mask built-in feature).
I'm afraid the arbitrary mask built-in feature is somewhat limited in regards to alphanumeric combinations... but I may be wrong.
Copy link to clipboard
Copied
You'll find the specification for this type of formatting here, on the reference entry for the util.printx function:
Copy link to clipboard
Copied
Can you indicate where the addition of a letter in upper case need to be added in that driver's license?
Copy link to clipboard
Copied
For example, if you decide to use the arbitrary mask built-in feature, keep in mind that, where there are numbers, they sbould be represented with a "9" and where an alphabet letter must be typed in, it must be represented with an "A" for the propper format. The arbitrary mask format will throw errors if you use "X".
So, this is working for me with no script, for example:
99999-99A99-99A
Make sure you type it in as "A" in upper case or the program will expect to insert lower case "a" and throw the error.
Copy link to clipboard
Copied
Thanks for your help. It is only the first digit that is a letter. I found on another thread that this validation script will make letters display as Uppercase regardless of how they are typed in and I tried it out and it is working.
event.value = event.value.toUpperCase();
Thanks Everyone for your help.