Manage Masks for Sequenced Numbers

Civic Platform users encounter many different sequenced numbers, such as citation numbers, permit numbers, and receipt numbers. Users can recognize the type of number because of the mask. A mask in Civic Platform determines how a number looks. For example, each new permit number might have a prefix indicating the type of permit and a date code in addition to the incriminated number. A citation number might have a prefix that identifies it as a citation and not a permit, receipt number, or another record in Civic Platform. After the initial implementation, you rarely need to modify masks.

Topics:

Edit a Mask

  1. Go to Classic Admin > Agency Profile > Edit Mask.
  2. On the Mask - Edit page, update the mask details.
    Sequence Type Select the type of sequence to edit.
    Mask Mask name.
    Starting Value The first value.
    Reset Value The reset value.
    Increment The number by which Civic Platform should increment the records.
    Description Mask description.
    Status Enable or disable the mask.
  3. Click Submit.

Format Mask Strings

Masks contain strings and keys. Strings are any characters that do not change, for example, a mask might contain CIT to indicate that the number is a citation number. Keys are specific building blocks that Civic Platform uses to generate the number. These building blocks might include the date and position of the number in a sequence.

A mask pattern consists of a combination of Variable Substitutions and literal text. A pattern generally has one sequence number variable that you can place anywhere in the pattern. All variables can appear in any position of the mask pattern. Civic Platform encloses all variables in $$ delimiters. An example sequence number variable is $$SEQ08$$.


Note: All variable names are case-sensitive. Example: $$MM$$ represents month but $$mm$$ represents minutes.

Examples and expected output:

Table 1. Example Mask Patterns
Sequence Type Example Output
CAP ID $$yyyy$$-$$SEQ07$$-RESBase = 10Reset Value = 10000000 2008-0000001-RES2008-0000021-RES2008-0000301-RES2008-0087601-RES2008-0099001-RES2008-9432001-RES
CAP ID LIC-$$yyyy$$-$$RANDOMZ06$$-$$SEQ##-####-###$$Base = 10Reset Value = 1000000000 LIC-2008-9AD633-12-3456-789LIC- 2008-ZX8F3E-12-3456-789LIC- 2008-78934RT-12-3456-789LIC- 2008-K8J7D3D-12-3456-789LIC- 2008-543DKF-12-3456-789LIC- 2008-4Z32KK-12-3456-789
CAP Key $$yy$$BLD-00000-$$SEQ05$$Base=36Reset Value = 60466176 (36^5) 08BLD-00000-0000108BLD-00000- 00A0108BLD-00000-0ZZ0108BLD- 00000-ZA421
CAP Key $$yy$$BLD-00000-$$SEQ05$$Base = 10Reset Value = 100000 08BLD-00000-0000108BLD-00000- 0001108BLD-00000-0043108BLD- 00000-0880108BLD-00000-99901
RECEIPT ID REC-$$CI$$-$$CDI$$-$$yyyyMMddHH$$-$$SEQ08$$Base = 10Reset Value = 100000000 REC-DC4-02-2008071416-00002423
Table 2. Common Data Formats
Description Syntax Example Output (2008-07-14 4:22 pm)
Year (2-digit) $$yy$$ 08
Year (4 digit) $$yyyy$$ 2008
Month in Year $$MM$$ 07
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 $$FF$$ 1
Day of Week in month $EEE$$ Mon
AM/PM $$aa$$ PM
Hour in Day (0-23) $$HH$$ 16
Hour in Day (1-24) $$kk$$ 17
Combine simple date patterns into a single more complex pattern. $$yyMMDD$$ 080714
$$yyMMM$$ 08JUL
$$yyMMDD-HH$$ 080714-16
Table 3. Fiscal Date Formats
Description Syntax Example 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
Fiscal Year (4 digit) $$FYYY$$ 2009
Fiscal Year (4 digit) $$FYYY$$ 2009
Fiscal Quarter (1 digit) $$FQ$$ 1
Fiscal Month/Period (2 digit) $$FM$$ 01
Fiscal Quarter (1 digit) $$FQ$$ 1
Fiscal Month/Period (2 digit) $$FM$$ 01
Table 4. Sequence Number Formats
Name 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 000090001000 83830000
$$SEQ5$$Base = 36 19AZ10999AZ8888
Sequence Number (formatted number) $$SEQ####$$ Starts with # (represents one digit) or an * (represents one hidden digit). Any other character is treated as literal text.

Warning: Do not use this feature for CAPKEY and CAP where duplicate masked sequences can cause problems.

$$SEQ##-#####$$Base = 10 01-23456
$$SEQ##-###-##$$Base = 10 01-234-56
$$SEQ*****-##$$Base = 10 *****-56
Sequence Number $$SEQZ05$$ Legacy Cap 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$$ 0000199999A0000 A9999B0000Z9999
Table 5. Miscellaneous Formats
Name 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$$ 9909909990
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, 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$$ ASD8323NMJ
$$RANDOMZ09$$ KF823L12L Z8M3829D2
Table 6. Receipt Variables Applicable to Receipt Masks Only
Name Syntax Description Example Output
Cash Drawer ID $$CDI$$ ID information for Cashier Drawer. 05
Cashier Workstation $$CI$$ Information for Cashier Workstation. D42