Understanding Recommended Mask Formats

This section provides supporting information when using the sequence generator. It repeats key sequence and mask concepts previously covered in this section. It also has several tables to refer to when defining the Pattern field in a Mask Definition. This information helps ensure the pattern you design meets your numbering requirements.

Topics

Understanding Masks

You can apply masks to phone number and postal code fields to ensure that users enter these numbers in the appropriate format. For example, your agency might want to require users to include their country code with their phone number, or to require users to enter phone numbers as 888.555.1212 rather than 888-555-1212. If a user attempts to enter a number in another format, Civic Platform delivers an error message and asks them to reenter the number.

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. For example, to create a format that forces users to enter a phone number in the format (800)555-1212 x.555, enter (000)000-0000 x.###.

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. For example, you might want to use a single number pool for all of the application types for the building module but have the mask display different information with that number. For example: you could name your Record ID Sequence Definition “Building” and then your mask definitions “Building-Residential” and “Building-Commercial” could reference Sequence Definition Building.

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. For example, you write a sequence number variable as $$SEQ08$$. For example, 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 Example Mask Patterns.

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.

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). For example, you can represent over 60 million different Record Keys from the same number pool (sequence interval) without conflict.

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

Pre-defined Sequence Types and Masks

Pre-Defined Sequences and Masks lists the predefined sequences and masks that come with Civic Platform. This section also explains how to locate the pre-defined sequences by the Default name in the navigation tree.

Table 1. Pre-Defined Sequences and Masks
Sequence Type Mask Name Mask Definition Name Description Best Practices
Agency > Batch Invoice Batch Invoice Batch Invoice Special Purpose Agency Sequence. Batch Invoice definition is $$SEQ12$$ with the numbers displayed as base 10. Sequence Interval equals “None” which means it never resets based upon a date. Use the default setting and do not modify the default.
Agency> Classic Citation Number Classic Citation Number Classic Citation Number Special Purpose Agency Sequence. Classic Citation Number definition is $$SEQ19$$ with the numbers displayed as base 10.

Sequence Interval equals “None” which means it never resets based upon a date.

Use the default setting and do not modify the default.
Agency > Invoice Invoice Invoice Special Purpose Agency Sequence. Invoice definition is $$SEQ12$$ with the numbers displayed as base 10. Sequence Interval is equal to “None” which means it never resets based upon a date. Use the default setting and do not modify the default.
Agency > Project Number Project Number Project Number Special Purpose Agency Sequence. Project Number definition is $$SEQ19$$ with the numbers displayed as base 10. Sequence Interval is equal to “None” which means it never resets based upon a date. Use the default setting and do not modify the default.
Agency >Set ID < Set ID Masks are listed below> Set ID Special Purpose Agency Set ID Sequence Definition.

Set ID defaults to a single Set ID shared by multiple Set Masks. You can modify each Set Mask to use a unique number pool.

The Sequence Interval is equal to “Calendar Year” so it resets based upon a calendar year.

Civic Platform uses this Set ID Sequence Definition for all of the different Set ID Masks, including Address Set ID, Record Set ID, Licensed Professional Set ID, Parcel Set ID, RandomAudit Set ID, and Set of Sets ID.
Use default setting.
Address Set ID Set ID The Record Set ID Mask Pattern is $$yy$$-SET-$$SEQ05$$ with a base of 10. Civic Platform shares the Set ID Sequence Definition with the other Set ID masks. Use default setting.
Record Set ID Set ID The Record Set ID Mask Pattern is $$yy$$-SET-$$SEQ05$$ with a base of 10. Civic Platform shares the Set ID Sequence Definition with the other Set ID masks. Use default setting.
Licensed Professional Set ID Set ID The Licensed Professional Set ID Mask Pattern is $$yy$$-LP-$$SEQ05$$ with a base of 10. Civic Platform shares the Set ID Sequence Definition with the other Set ID masks. Use default setting.
Parcel Set ID Set ID The Parcel Set ID Mask Pattern is $$yy$$-PARCEL-$$SEQ05$$ with a base of 10. Civic Platform shares the Set ID Sequence Definition with the other Set ID masks. Use default setting.
Set of Sets ID Set ID The Set of Sets ID Mask Pattern is $$yy$$-SETS-$$SEQ05$$ with a base of 10. Civic Platform shares the Set ID Sequence Definition with the other Set ID masks. Use default setting.
Asset ID > Default Default Default The Default Mask Pattern for the Asset ID is $$SEQ015$$ with a base of 10.

The Sequence Interval Type is equal to None and the Sequence Name is “N” which means it never resets based upon a date.

Use default setting.
Invoice Agency-Invoice Agency-Invoice Agency Invoice Sequence. Agency-Invoice definition is $$SEQ12$$ with the numbers displayed as base 10. The Sequence Interval is equal to “None” which means it never resets based upon a date (the agency default if you do not set up any custom receipts). Use the default setting and do not modify the default.
Invoice POS-Invoice <module> POS-Invoice <module> Agency Invoice Module.

Point of Sale invoice module masks can follow the pattern in your agency’s accounting system. The Mask Definition and Sequence Definition that applies to a POS invoice is equal to “POS-Invoice-<module>.”

This configuration enables you to identify what department or group to associate with the Point of Sale (POS) invoice. For example, replace <module> with a department name such as “POS-Invoice-Building.” You must create invoice sequences and mask definitions before you can use the point of sale features.

The Sequence Interval Type is equal to Calendar Year and the Sequence Name is “CYyyyy” where yyyy reflects the year in four digits so it resets based upon a calendar year.
Configure Point of Sale Invoice the same as any other custom invoice.
Record ID Default Default The Record ID Default can handle over 60,000,000 unique keys every year. The Mask Pattern is $$yy$$Record-00000-$$SEQ05$$ with a base of 36 because it is a key.

The Sequence Interval Type is equal to Calendar Year and the Sequence Name is “CYyyyy” where yyyy reflects the year in four digits so it resets based upon a calendar year.

Use default setting.
Record Key Default Default The Record Key Default can handle over 60,000,000 unique keys every year. The Mask Pattern is $$yy$$Record-00000-$$SEQ05$$ with a base of 36 because it is a key. The Sequence Interval Type is equal to Calendar Year and the Sequence Name is “CYyyyy” where yyyy reflects the year in four digits so it resets based upon a calendar year. Use default setting.
Record Key Model Record Model Record Special Purpose Record Key Sequence. You can have up to 9999 models defined each year in Civic Platform. The Defaultpattern is: $$yy$$MDL-00000-#$$SEQ04$$ The base is 10. Use the default setting and do not modify the default.
Partial Record ID Default Default Special Purpose Record ID Sequence. The Default pattern is $$yy$$EST-$$SEQ06$$. The base is 10.

The Sequence Interval Type is equal to Calendar Year and the Sequence Name is “CYyyyy” where yyyy reflects the year in four digits so it resets based upon a calendar year.

Use the default setting and do not modify the default.
Temporary Record ID Default Default Special Purpose Record ID Sequence. The Default pattern is $$yy$$TMP-$$SEQ06$$. The base is 10.

The Sequence Interval Type is equal to Calendar Year and the Sequence Name is “CYyyyy” where yyyy reflects the year in four digits so it resets based upon a calendar year.

Use the default setting and do not modify the default.
Receipt Agency-Receipt Agency-Receipt Special Purpose Receipt Sequence. Agency-Receipt definition is $$SEQ12$$ with the numbers displayed as base 10. The Sequence Interval is equal to “None” which means it never resets based upon a date (the agency default if you do not define any custom receipts). Use the default setting and do not modify the default.
Receipt POS-Receipt- <module> POS-Receipt- <module> Special Purpose Receipt.

Point of Sale receipt masks are for special purpose Receipts. The point of sale system uses this by getting the Mask Definition and/Sequence Definition named “POS-Receipt-<module>” where <module> is the name of the Point of Sale (POS) receipt that you are defining.

For example, “POS-Receipt-Building.” You must create receipt sequence and mask definitions before you can use a point of sale.

The Sequence Interval Type is equal to Calendar Year and the Sequence Name is “CYyyyy” where yyyy reflects the year in four digits so it resets based upon a calendar year.

Configure Point of Sale Receipts the same as any other custom receipt.
Receipt PP-Receipt PP_RECEIPT_SEQ Special Purpose Receipt. Payment Processing receipt masks are for special purpose Receipts. The Payment Processing system uses them by getting the Mask/Sequence Definition named “PP_RECEIPT_SEQ.”

You must create these receipt sequence and mask definitions before you can use Payment Processing.

Configure Payment Processing Receipts the same as any other custom receipt.
Receipt SET-Receipt <module> SET-RECEIPT_SEQ Special Purpose Receipt. Create Set receipt masks for special purpose Receipts. The Set/Sets system uses this by getting the Mask/Sequence Def named “SET_RECEIPT_SEQ.”

You must create receipt sequence and mask definitions before you can use Payment Processing.

Configure Set/Sets Receipts the same as any other custom receipt.
Receipt POS-Invoice- <module> POS-Invoice- <module> Special Purpose Invoice.

Create Point of Sale Invoice masks as a special purpose Invoice. The point of sale system uses them by getting the Mask/Sequence Def named “POS-Invoice-<module>” where <module> is the name of the Point of Sale (POS) invoices you are defining. For example, “POS-Invoice-Building.”

You must create these invoice sequence and mask definitions before you can use POS.

Configure Point of Sale Invoices the same as any other custom receipt.

You can locate the Default settings by expanding the Sequence by Type in the navigation tree. Refer to illustrations highlighting Default examples of a default Sequence Definition and Mask Definition for the Asset ID.

Default Mask Definition for Asset ID, highlights where to locate the Default Sequence Definition for the Asset.

Figure: Default Mask Definition for Asset ID



Default Sequence Definition for Asset ID, highlights the Default Mask Definition for the Asset ID.

Figure: Default Sequence Definition for Asset ID



Example Mask Patterns

Table 2. Example Mask Patterns
Sequence Type Example Output
Invoice INV-$$yyyyMMddHH$$-$$SEQ08$$Base = 10Reset Value = 99999999 (10^8 – 1) REC-2010083116-00000003
Record ID $$yyyy$$-$$SEQ07$$-RESBase = 10 (always recommended for Record ID)Reset Value = 99999999 (10^8 – 1) 2008-00000001-RES2008-00000021-RES2008-00000301-RES2008-00087601-RES
Record ID LIC-$$yyyy$$-$$RANDOMZ06$$-$$SEQ##-####-###$$Base = 10 Reset Value = 999999999 (10^9 – 1) LIC-2008-9AD633-12-3456-789LIC- 2008-ZX8F3E-12-3456-789LIC- 2008-78934RT-12-3456-789LIC- 2008-K8J7D3D-12-3456-789
Record Key $$yy$$BLD-00000-$$SEQ05$$Base=36Reset Value = 60466175 (36^5 - 1) Note: In the pattern for new Record Key definitions, always use Base=36, Reset Value = 60466175 (36^5 - 1), and $$SEQ05$$ 08BLD-00000-0000108BLD-00000- 00A0108BLD-00000-0ZZ0108BLD-00000- ZA421
Record Key $$yy$$BLD-00000-$$SEQ05$$Base = 10Reset Value = 99999 (10^5 – 1) 08BLD-00000-0000108BLD-00000- 0001108BLD-00000-0043108BLD-00000- 08801
Receipt REC-$$CI$$-$$CDI$$-$$yyyyMMddHH$$-$$SEQ08$$Base = 10Reset Value = 99999999 (10^8 – 1) REC-DC4-02-2008071416-00002423

Common Date Formats

Table 3. Common Date Formats
Description Syntax Example of Output (2008-07-14 4:22 pm)
Year (2 digit) $$yy$$ 08
Year (4 digit) $$FYYY$$ 2008
Month in Year $$MM$$ 7
Month in Year $$MMM$$ Jul
Week in Year $$ww$$ 28
Week in Month $$W$$ 2
Day in Year $$DD$$ 197
Day in Month $$dd$$ 14
Day of Week in month $$F$$ 1
Day of Week in month $$EEE$$ Mon
AM/PM $$Accela Automation$$ PM
Hour in Day (0- 23) $$HH$$ 16(Example: 2008-07-14 0:22 -> 00)
Hour in Day (1 - 24) $$kk$$ 16(Example: 2008-07-14 0:22 -> 24)
You can combine Simple Date patterns into a single, more complex pattern. $$yyMMdd$$ 080714
You can combine Simple Date patterns into a single, more complex pattern. $$yyMMM$$ 08JUL
You can combine Simple Date patterns into a single, more complex pattern. $$yyMMdd-HH$$ 080714-16

Fiscal Date Formats

Civic Platform supports fiscal years that start on the first day of a calendar month.

Table 4. Fiscal Date Formats
Description Syntax Example of Output (2008-07-14 4:22 pm with Fiscal Year start = 07)
Fiscal Year (2 digit) $$FY$$ 09
Fiscal Year (4 digit) $$FYYY$$ 2009
Fiscal Quarter (1 digit) $$FQ$$ 1
Fiscal Month/Period (2 digit) $$FM$$ 01

Sequence Number Formats

Table 5. Sequence Number Formats
Description Syntax Description Example Output
Sequence Number (Default) $$SEQ$$ 1-5 digits with valid digits determined by Sequence Number Base (2-36). $$SEQ$$Base = 10 99909990
$$SEQ$$Base = 36 8Z2SDFZ9ZZ8
Sequence Number $$SEQ[0]n$$ [0] Left Zero Fill if sequence does not require all n digits.n = maximum number of digits to display. $$SEQ05$$Base = 10 00009000 100083830000
$$SEQ5$$Base = 36 19AZ10999A Z8888
Sequence Number (formatted number) $$SEQ####$$ Formatted Number. Starts with # or *. Each # represents one digit. Each * represents one hidden digit.

Warning: Do not use hidden digits if the sequence numbers generated must be unique because doing so causes the mask definition to return duplicate sequences. Do not use this option for asset IDs, record keys, record IDs, or receipts for Civic Platform to function properly.

Civic Platform treats any other character as literal text.

$$SEQ##-#####$$Base = 10 01-23456
$$SEQ##-###-##$$Base = 10 01-234-56
$$SEQ*****-##$$Base = 10 *****-56
Sequence Number $$SEQZ05$$ Legacy Record Key Sequence Format. Most significant digit is base 36 (valid values are[0-9]|[A-Z]). All other characters are base 10 (valid values are [0-9]. $$SEQZ05$$ 0000199999 A0000A9999 B0000Z9999

Miscellaneous Formats

Table 6. Miscellaneous Formats
Description Syntax Description Example Output
Literal Dollar Sign $$DOLLAR$$ Text $$DOLLAR$$ $
Random Number (Default) $$RANDOM$$ Creates from 1-5 random digits with values from [0-9]. $$RANDOM$$ 9 90 990 9990
Random Number $$RANDOM[Z][0]n$$ Creates from 1-20 random digits with values from [0-9] (base 10) or [0-9] |[A-Z] (base 36).[Z] set = base 36. If not set = base 10.[0] set = left zero fill to guarantee the exact number of digits.n = number of digits. Default=5, Min=1, Max=20. $$RANDOMZ05$$$$RANDOMZ9$$ ASD83 23NMJKF823L12L Z8M3829D2

Receipt Variables for Receipt Masks

The variables in Receipt Variables for Receipt Masks apply to receipt masks.

Table 7. Receipt Variables for Receipt Masks
Description Syntax Description Example Output
Cash Drawer ID $$CDI$$ Cashier Drawer ID. Use only for receipt sequences. 05
Cashier Workstation $$CI$$ Cashier Workstation Information. Use only for receipt sequences D42
Type Alias $$RECTYPE-ALIAS$$ Record Type Alias. Use only for receipt sequences; does not work for PP-Receipt and SET-Receipt. Facilities Condos
Group $$RECTYPE-1$$ The first element of application type. Use only for receipt sequences but does not work for PP-Receipt and SET-Receipt. Building
Type $$RECTYPE-2$$ The second element of application type. Use only for receipt sequences but does not work for PP-Receipt and SET-Receipt. Facilities
SubType $$RECTYPE-3$$ The third element of application type. Use only for receipt sequences but does not work for PP-Receipt and SET-Receipt. Remodel
Category $$RECTYPE-4$$ The fourth element of application type. Use only for receipt sequences but does not work for PP-Receipt and SET-Receipt. Condos
Module Name $$RECTYPE-MODULE$$ The module name of application type. Use only for receipt sequences but does not work for PP-Receipt and SET-Receipt. Building
Department Alias $$DEPT-ALIAS$$ The department name of organization. Use only for receipt sequences. Long Range
Bureau $$DEPT-1$$ The first element of the organization level. Use only for receipt sequences. DSD
Division $$DEPT-2$$ The second element of the organization level. Use only for receipt sequences. PLN
Section $$DEPT-3$$ The third element of the organization level. Use only for receipt sequences. NA
Group $$DEPT-4$$ The fourth element of the organization level. Use only for receipt sequences. Long Range
Office $$DEPT-5$$ The fifth element of the organization level. Use only for receipt sequences. NA
User Name $$USERID$$ User Login ID. Use only for receipt sequences. Admin

Invoice Variables for Invoice Masks

Table 8. Invoice Variables for Invoice Masks
Description Syntax Description Example Output
Record Type Alias $$RECTYPE-ALIAS$$ Record Type Alias. Facilities Condos
Group $$RECTYPE-1$$ The first element of application type. Building
Type $$RECTYPE-2$$ The second element of application type. Facilities
SubType $$RECTYPE-3$$ The third element of application type. Remodel
Category $$RECTYPE-4$$ The fourth element of application type. Condos
Module Name $$RECTYPE-MODULE$$ The module name of application type. Building
Department Alias $$DEPT-ALIAS$$ The department name of organization. Long Range
Bureau $$DEPT-1$$ The first element of the organization level. DSD
Division $$DEPT-2$$ The second element of the organization level. PLN
Section $$DEPT-3$$ The third element of the organization level. NA
Group $$DEPT-4$$ The fourth element of the organization level. LONGRANG
Office $$DEPT-5$$ The fifth element of the organization level. NA
User Name $$USERID$$ User Login ID. Admin

Recommended Patterns and Sequence Reset Values

Table 9. Recommended Patterns and Sequence Reset Values
Mask Pattern Base 10 Sequence Reset Value Base 36 Sequence Reset Value
$$SEQ01$$ 9 10^1-1 35 36^1-1
$$SEQ02$$ 99 10^2-1 1295 36^2-1
$$SEQ03$$ 999 10^3-1 46655 36^3-1
$$SEQ04$$ 9999 10^4-1 1679615 36^4-1
$$SEQ05$$ 99999 10^5-1 60466175 36^5-1
$$SEQ06$$ 999999 10^6-1 2176782335 36^6-1
$$SEQ07$$ 9999999 10^7-1 78364164095 36^7-1
$$SEQ08$$ 99999999 10^8-1 2821109907455 36^8-1
$$SEQ09$$ 999999999 10^9-1 101559956668415 36^9-1
$$SEQ010$$ 9999999999 10^10-1 3656158440062975 36^10-1
$$SEQ011$$ 99999999999 10^11-1 131621703842267135 36^11-1
$$SEQ012$$ 999999999999 10^12-1 4738381338321616895 36^12-1
$$SEQ013$$ 9999999999900 10^13-1 9223372036854775807 36^13-1
$$SEQ014$$ 99999999999999 10^14-1 Not Applicable N/A
$$SEQ015$$ 999999999999999 10^15-1 N/A N/A
$$SEQ016$$ 9999999999999999 10^16-1 N/A N/A
$$SEQ017$$ 99999999999999999 10^17-1 N/A N/A
$$SEQ017$$ 999999999999999999 10^19-1 N/A N/A
$$SEQ019$$ 9223372036854775807 2^63-1 N/A N/A