Understanding Masks

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 are enclosed in “$$” delimiters. An example sequence number variable is $$SEQ08$$.


Note:

All variable names are case-sensitive. For example $$MM$$ represents month data but $$mm$$ represents minutes data.


For example mask patterns see Table 1. For instructions on how to edit a mask, see Editing a Mask.

Examples and expected output:

  • Table 1

  • Table 2

  • Table 3

  • Table 4

  • Table 5

  • Table 6

    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
You can 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
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 digitsn = maximum number of digits to display $$SEQ05$$Base = 10 000090001000 83830000
$$SEQ5$$Base = 36 19AZ10999AZ8888
Sequence Number (formatted number) $$SEQ####$$ Formatted Number. Starts with # or an *. Each # represents one digitEach * represents one hidden digit. Warning: do not use this feature for CAPKEY and CAP where duplicate masked sequences can cause problems.

Any other character is treated as literal text.

$$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
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$$ 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
Description Syntax Description Example Output
Cash Drawer ID $$CDI$$ Cashier Drawer ID. Only used for Receipt Sequences 05
Cashier Workstation $$CI$$ Cashier Workstation Information. Only used for Receipt Sequences D42