Parameter Input Mask
By default, a parameter value can be any combination and number of characters. This may be undesirable, for example if the parameter specifies a phone number and you want all your phone numbers in Active Directory to follow a set pattern. In such cases, you can set an input mask.
An input mask defines which characters are allowed where in the parameter's value. Each mask character acts as a placeholder for one character of a specific type. For example, if a parameter specifies a phone number, you can set an input mask to enforce the input of exactly ten numbers. At the input moment, Ivanti Automation will translate the mask characters into underscores where the user is to provide input. If you set an input mask 1234560000, this will be shown as 123456____ in the input field (because 0 is a mask character, whereas the other characters are not). The user will be able to enter numbers where the underscores are shown, but not other characters.
An input mask consists of two parts: the Mask and the Literal.
- The Mask contains mask characters. Each mask character acts as a placeholder for one character of a specific type. For example, 0 stands for a number between 0 and 9, and L stands for a lowercase or uppercase letter. Optionally, the mask may also contain regular characters that do not function as placeholders, but that are included in the parameter value.
- The Literal is filled automatically on the basis of the mask information. The literal shows where a user will be able to provide input by translating the mask characters into underscores. If a mask character has been translated into an underscore but should be kept as a regular character, you can toggle it back using the arrow up and down keys.
More information
When setting input masks, you can combine regular characters with any of the mask characters from the table below:
Mask character
Valid characters
Sample mask
Sample literal
Sample parameter value
0
0-9
Phone: (073)-000-0000
Phone: (073)-___-____
Phone: (073)-622-8800
9
0-9 or space (" ")
Phone: 999999999999
Phone: ____________
Phone: 073 622 8800
#
0-9 or space (" ") or + or -
Phone: ##### ## ### ####
Phone: _____ __ ___ ____
Phone: +0031 73 622 8800
L
a-Z
Alpha: LLLLLLL
Alpha: _______
Alpha: AbCdEfG
?
a-Z or space (" ")
Name: ??????????
Name: __________
Name: Dan Harris
A
0-9 and a-Z
User name: AAAAA
User name: _____
User name: HarD1
a
0-9 and a-Z or space (" ")
User: aaaaaaaa
User: ________
User: Harris 1
&
All print characters
PrintChar: &&&&&&&&
PrintChar: ________
PrintChar: 5*X+[2n]
H
0-9 and A-F
Hex: 0xHHHHHHHH
Hex: 0x________
Hex: 0x002FD89A
X
0-9 and A-F and space (" ")
Hex: 0xXXXXXXX
Hex: 0x_______
Hex: 0x1 FD89A
>
Forces uppercase (A-Z)
Postal code: >> 00000
Postal code: __ _____
Postal code: MI 48506
<
Forces lowercase (a-z)
Title: <<<<<<<
Title: _______
Title: manager
Examples
If you set an input mask PHONE: 073-000000, this will be shown as P_ONE: _73-______ in the literal. Using the arrow up and down keys, you can toggle the relevant underscores, so that the literal shows as PHONE: 073-______.
If you want to show a prompt for a telephone number that is restricted to numeric values only, but the area code should be in between parentheses, you could define your mask as Phone No: (000) 000-0000. This results in the following prompt: Phone No: (___) ___-____, in which only numeric values can be entered.
- You can test your input mask by clicking Show preview.
- If you set an input mask for a parameter that has a default value, the default value has to match the input mask.