Masks
You can apply masks to phone number and postal code fields to ensure that users enter these numbers in the appropriate format.
When creating masks, enter “0”s or “#”s in the positions where you want Civic Platform to accept any number or character. Civic Platform requires users to enter all characters in the expected format and position.
Using the sequence generator you can define masks for numbered items. A mask in Civic Platform determines how a number displays to a user. For example, each new permit number might have a prefix indicating the type of permit and a date code in addition to the incremental number. A citation number can have a prefix that identifies it as a citation and not a permit, receipt number, or other incremental record in Civic Platform. After the initial implementation, you rarely need to modify masks.
When creating the pattern of the mask, be certain that you include the interval type within the sequence number. By including the interval type in the pattern ensures uniqueness. Without the interval type, you might introduce duplicates.
Mask definitions can only reference a single sequence definition. You can have many mask definitions that point to the same sequence definition. This way, you can have multiple masks using the same number pool.
A mask pattern consists of a combination of variable substitutions and literal text. A pattern has one sequence number variable you can place anywhere in the pattern. All variables can appear in any position of the mask pattern. Enclose all variables in “$$” delimiters.
A mask might contain CIT to indicate that the number is a citation number. This section details the various items that you can include in the pattern.
Sequence mask patterns return results in all uppercase.
All variable names are case-sensitive. For example $$MM$$ represents month data but $$mm$$ represents minutes data.
For the basic building blocks of masks, refer to the Example mask patterns table.
The date patterns can represent year, month, day, day of year, hour, day of month, day of week. For a list of all mask pattern possibilities, refer to the Common date formats table.
With pattern masks, you can represent numbers as Base 10 (meaning each digit can be 0-9) or Base 36 (meaning each digit can be 0-9 or A-Z).
| Name | Pattern |
|---|---|
| Example record key pattern | $$yy$$BLD-00000-$$SEQ05$$ with a base of 36 |
| Corresponding record ID pattern | $$yy$$BLD-$$SEQ08$$ with a base of 10 |