<autonumber>

You can also use the Auto Number component in DesignStudio.

To enable sequential numbering, insert the <autonumber> tag anywhere in the HTML for an input view. With this tag, numbers are sequential and do not change for record updates. The numbering is specific to the designated board table. You can use multiple instances of the tag in a single board table. The resulting number is searchable using the Unified Command Platform search tag.

<autonumber> attributes
Attribute Allowed Values Requirements Description

name

%fieldname

Required

Defines the name of the field.

startnumber

NUMBER

Optional

Defines the start number, if it is different from 1.

resetday

1-31

Optional

Defines the day when the number resets.

Used in combination with the reset month attribute.

resetmonth

1-12

Optional

Defines the month when the number resets.

Used in combination with the rest day attribute.

digits

NUMBER

Examples:

  • 1 – 1

  • 2 – 01

  • 3 – 001

  • 4 – 0001

  • 5 - 00001

Optional

Defines the number of digits or leading zeros used in the number.

The rollover time, day, month, and year placeholders use the Unified Command Platform server timezone.

The autonumber tag works as follows in relation to Unified Command Platform incidents:

  • If the table is incident dependent, when a new incident is created, the count returns to 1.

  • If the table is incident independent, the number keeps counting regardless of the incident.

  • If the table is set to static and data is added to the setup incident, the added records are assigned the first sequential numbers (in the order in which they are added) for any newly created incidents.

Custom Formatting

Custom formatting features allow you to define number formatting. This formatting includes the ability to add static text, define the number of leading zeros that use the <digits> attribute, stamp the month ({MM}), day ({DD}), 2-digit year ({YY}), 4-digit year ({YYYY}), and/or add one or more multiple status board fields.

The following formatting attributes are supported.

<autonumber> formatting attributes
Attribute Allowed Values Description

Field Name

{fieldname}

Defines a field name value. Replace "fieldname" with the name of the field you want to use.

Year

{YYYY}

Inserts the current year as a 4-digit number.

Year (2 digits)

{YY}

Inserts the current year as a 2-digit number.

Month

{MM}

Inserts the current month as a 2-digit number.

Day

{DD}

Inserts the current day as a 2-digit number.

Example

The following table provides examples showing the code and expected results.

<autonumber> format examples
Auto Number Format Results Code

Auto number

1, 23, 545

<autonumber name="number"/>

001, 023, 232

<autonumber digits="3" name="number"/>

Incident id (board field)-auto number

1210-001

<autonumber digits="3" name="number">{incidentid}-{autonumber}</autonumber>

Year-auto number

18-00035

<autonumber digits="6" name="number">{YY}-{autonumber}</autonumber>

Year-auto number-Month

19-00024-05

<autonumber digits="6" name="number">{YY}-{autonumber}-{MM}</autonumber>

ABC(static text)-Month-auto number

ABC-02-025

<autonumber digits="3" name="number">ABC-{MM}-{autonumber}</autonumber>

The formatting and static text values become part of the actual id. If you use dates, the date the record is created is entered into the record in the name of the field in "name".

The following example is from the specifications.

Ensure that the name of the field is in lowercase.

Copy Code
<autonumber name="auto_number2" startnumber="0437" digits="4">BEFORE-{autonumber}-AFTER</>