Sequence Generator
  • 26 Jun 2024
  • 8 Minutes to read
  • PDF

Sequence Generator

  • PDF

Article summary

The Sequence Generator is the third stepper of Form Designer. It allows you to define a sequenced format for IDs that are generated automatically. It generates the unique values such as Incident IDs, Service Request number and so on. Its primary purpose is to generate a defined sequential output.

Let's explore the following use-case.
Use Case

User Persona: Application Designer

Solution
The Application Designer Sam wants to create an interface for their application where the Incident IDs for all the logged incidents get sequentially displayed automatically. The Incident ID should have a prefix which identifies the Incident module and is of maximum length 5. All Incident IDs should get displayed under a specific column with relevant column name.
 
Also, the sequence should get reset yearly with IST time Zone.

To achieve this functionality, he can configure the Sequence Generator tab. Enable the Auto Number Required toggle switch.
Define the Auto Sequence Column Name as Incident ID, ID Format as Module Code, Sequence Length as 5, Starts From as 1. Enable the Reset Sequence toggle switch. Select the Time Zone as IST and Reset Interval as Yearly.

Configure Sequence Generator

To configure the Sequence Generator, perform the following steps:

  1. Navigate to Design Studio > Form Designer > Design Form
  2. After configuring the first two steppers General, and Design Form the Sequence Generator tab gets enabled for a new form. You can directly navigate to the Sequence Generator tab for an existing form. A sample screenshot is shown below:

Figure: Sequence Generator

Field Description

The following table contains a brief description on Sequence Generator screen fields.

Field NameDescription

Auto Number Required?
Enable this toggle button to define the different code format for the auto-generated IDs. If enabled, the following fields are displayed:
  • Separator Required
  • Auto Sequence Column Name
  • Short Code
  • ID Format
  • Sequence Length
  • Starts From
Separator RequiredIf enabled, the separator is required to separate the phrases in the code format towards the right of each phrase. If enabled, the phrases in the code format will be separated by a separator. The default separator is a backslash (/).
For Example: IM/2021/05/24/130994
Auto Sequence Column NameSpecify the column name for the auto-generated IDs.

For Example: The Incident ID (Auto Sequence Column Name) displays the list of auto generated Incident IDs.
Short CodeSpecify the short code for the auto-generated IDs.

For Example - Specify the module level short code for Incident Management module as IM or short code of Service Request module as SR.
ID FormatThe ID Format contains the options such as ID Format, Group Record By, Characters Per Attributes, Time Zone, Reset Interval and Reset Sequence. A sample screenshot is shown below: 
ScreenshotFigure - ID Format
ID FormatDefine the ID format for the sequentially auto-generated IDs. Accordingly, the system will generate the code for the auto-generated IDs.
Enter $ to view the list of all of the attributes that can be added as ID format. It includes system attributes and custom attributes. The system and custom attributes are differentiated by color. A sample screenshot is shown below:
ScreenshotFigure - List of all attributes - Color coding 
Default Attributes - The attributes which are common for any form are default attributes. For example - Date, Module Code etc.
Custom Attributes - The attributes which are added in the current form are custom attributes. For example - Priority, Impact etc. 

System Defined Attributes - The system defined attributes are single select referenced control from the current form. For example - Single Choice, Auto Complete.
Search for any attribute in the Search textbox. Type minimum first two characters followed by $ sign to filter the attributes.
   
Case I - Type $mo. It displays the result as shown in the following screenshotFigure: Search Attributes
Case II - Type $month. It displays the result as shown in the following screenshotFigure - Search Attributes
The selected attributes get added as chip in the ID text area. A sample screenshot is shown below:                 
ScreenshotFigure: Attributes as chip 
The color coding done for System and Custom Attributes is applicable on chips as well.  
Delete any chip using x (close) icon. The attributes can be separated by any special character. 

 The characters count is displayed as subtitle just below the ID Format box. 
The maximum characters that can be defined in Code Format is 50. System displays the following validation message if number of characters exceeds 50. 
ScreenshotFigure: Validation Message - Code Format
Group Record ByThis field is enabled only when ID Format includes at least a Tenant or a Domain or a Sub Domain. Select the required option from the drop-down list. The drop-down list options are displayed based on the defined Tenant, Domain or Sub Domain in the ID Format. The following table describes it briefly:
Code Format includesGroup Record By options
Tenant
  • Tenant Code
  • Sub Domain
  • Domain
Domain
  • Domain
Sub Domain
  • Domain
  • Sub Domain
Characters Per AttributesSelect the numeric value from the drop-down within the range from 1 to 5.
The maximum value for characters per attributes is 1. 

The minimum value for characters per attributes is 5.
Note
Spaces are not considered as characters.
For Example - If Attribute value is Inc Hardware and Character Per Attributes is selected as 4 then it will be displayed as IncH and not Inc.
Time ZoneThis field is visible only when Reset Sequence is enabled. Select the time zone for which the reset sequence should reset the value. Available options are as follows:
  • GMT
  • CET
  • IST
  • CST
Scenario I - Time Zone is changed after the displayed message was closed While designing a form, Reset Sequence is selected as Daily on 19-April-2023. In this scenario, the system displays the following message:
"Sequence will next be reset on 20-April-2023 12:01am IST."
The above message is closed either by using x symbol or it gets disappeared after few seconds. Once the message is disappeared and then the Time Zone is selected as UTC. In this case, the system displays the above message again with the changed time zone.
"Sequence will next be reset on 20-April-2023 12:01am UTC."
Scenario II - Time Zone is changed before the displayed message was closed While designing a form, Reset Sequence is selected as Daily on 19-April-2023. In this scenario, the system displays the following message:
"Sequence will next be reset on 20-April-2023 12:01am IST."
The Time Zone is selected as UTC while the above message is still displayed. In this case, the above message will get changed to the following message with the changed time zone.
"Sequence will next be reset on 20-April-2023 12:01am UTC." 
Refresh IntervalThis field is visible only when Reset Sequence is enabled. Select the interval at which the sequence should be reset. The available options are as follows:

Daily - Select it to reset the interval to reset the sequence daily. The sequence will be reset every year on 1st January at 12.01 AM in the selected time zone. The sequence gets reset to number defined in Start From field. The System displays the message with following format:

"Sequence will next be reset on next date - month-year 12.01 am <selected time zone>."
Let's understand the more about this functionality with different scenarios.
Scenario I - Tomorrow is next day of current month While designing a form, Reset Sequence is selected as Daily on 19-April-2023. In this scenario, the system displays the following message:
"Sequence will next be reset on 20-April-2023 12:01am IST."
Scenario II - Tomorrow is first day of next month of current year While designing a form, Reset Sequence is selected as Daily on 31-May-2023. In this scenario, the system displays the following message:
"Sequence will next be reset on 01-June-2023 12:01am IST."
Scenario III - Tomorrow is first day of next month of next year While designing a form, Reset Sequence is selected as Daily on 31-December-2023. In this scenario, the system displays the following message:
"Sequence will next be reset on 01-January-2024 12:01am IST."

Monthly - Select it to reset the interval to reset the sequence on last day of every month in the selected time zone. The sequence gets reset to number defined in Start From field. The system displays the message with following format. 
"Sequence will next be reset on 01-next month-year 12:01am <selected time zone>." 
Let's understand the more about this functionality with different scenarios. 
Scenario I - Current month is before December While designing a form, Reset Sequence is selected as Monthly on 19-April-2023. In this scenario, the system displays the following message:
"Sequence will next be reset on 01-May-2023 12:01am IST."
Scenario II - Current month is December While designing a form, Reset Sequence is selected as Monthly on 19 December 2023. In this scenario, the system displays the following message:
"Sequence will next be reset on 01-January-2024 12:01am IST."


Yearly - Select it to reset the interval to reset the sequence annually. The sequence will be reset every year on 1st January at 12.01 AM in the selected time zone. The sequence gets reset to number defined in Start From field. The system displays the message with following format: 

"Sequence will next be reset on 01-January-next -year 12:01am <selected time zone>." 
Let's understand the more about this functionality with the following scenario.  

Scenario I While designing a form, Reset Sequence is selected as Yearly on 19-April-2023. In this scenario, the system displays the following message:
"Sequence will next be reset on 01-January-2024 12:01am IST."

Note
  • The Refresh Interval option is disabled if ID Format has added only Month or Date or Year/Date.
Reset SequenceThis field is enabled only when the System Attribute Year is defined in the ID Format.
The enabled Reset Sequence will be in Off status, by default. Toggle the switch to make it active.
Sequence LengthSpecify the numeric sequence for the auto-generated IDs that are generated sequentially.
Example - If Sequence Length is specified as 6, Incident ID can be 128765 or if Sequence Length is specified as 3, Incident Id can be 371.
Starts FromSpecify the numeric number from which the sequence of auto generated ID should start.
Example - If Sequence Length is specified as 6 and Starts From is defined as 9 then the first auto generated ID will be 000009.
Is Separator Required?To enable separator, slide is separator required button to the right. If enabled, the phrases in the code format will be separated by a separator. The default separator is a backslash (/).
Example: IM/2021/05/24/130994



Was this article helpful?

What's Next
Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.