Input mask

An input mask defines the format for data entry using characters and symbols as part of a project or button user input variable. When you apply an input mask to a user input variable, values entered by the user must follow the specific pattern defined by the input mask.

To apply an input mask to your user input variable, define the mask in the userInputs.domain.inputMask property.

The following table lists the characters and symbols that you can use in an input mask:

CharacterMeaning

A

ASCII alphabetic character required. Characters can be A through Z and a through z.

a

ASCII alphabetic character permitted but not required.

N

ASCII alphanumeric character required. Characters can be A through Z, a through z, and 0 through 9.

n

ASCII alphanumeric character permitted but not required.

X

Any character required.

x

Any character permitted but not required.

9

ASCII digit required. Digits can be 0 through 9.

0

ASCII digit permitted but not required.

D

ASCII digit required. Digits can be 1 through 9.

d

ASCII digit permitted but not required. Digits can be 1 through 9.

#

ASCII digit or plus/minus sign permitted but not required.

H

Hexadecimal character required. Characters can be A through F, a through f, and 0 through 9.

h

Hexadecimal character permitted but not required.

B

Binary character required. Characters can be 0 through 1.

b

Binary character permitted but not required.

>

All following alphabetic characters are uppercase.

<

All following alphabetic characters are lowercase.

!

Switch off case conversion.

\

Escape the special characters listed above to use them as separators.

The mask consists of a string of characters and separators, optionally followed by a semicolon and the character used for blanks. The blank characters are always removed from the text after editing. The following table lists example masks:

Example maskDescription

>A<xxxxxxxxxxxx

Text that starts with a capital letter followed by any lowercase characters.

AAA-AAA-AAA;_

Unique identifier that uses dashes as separators and underscores to represent each character that is to be completed.

B9.99;-

Represents a pH value. The number is constrained to start only with 0 or 1 and can only include two decimal places. A dash is used to represent each character that is to be completed.

999-99-9999

United States Social Security number.

(999) 999-9999

United States phone number.

900 kg

Weight in kilograms between 0 and 999.

99999

United States five-digit ZIP code.

AAA

IATA airport code.