ID Generation
  • 20 Dec 2021
  • 2 Minutes to read
  • Dark
    Light
  This documentation version is deprecated, please click here for the latest version.

ID Generation

  • Dark
    Light

Article summary

Overview

ID Generation steps are used to generate unique IDs for records. For instance, unique IDs are used for Process Folder Records.

Note

For more information on Process Folders, go to Setting Up a Proces Folder.

Creating New ID Generation Key

ID Generation Keys can be found under System>System Data>ID Generation. By default, the following ID Generation Key is provided: "ID Generation Key:R-".

2020-01-24_10h59_23.png

New ID Generation Keys can be made by using ID Generation steps found in a Flow designer.
In a Flow Designer, navigate to the Step Tab on the right panel. Under Integration>Internal Services> IDGeneration users will find the steps for generating IDs.

IDGenrationSteps Dec 24, 2020.png

Get Next ID

This step will create a new ID Generation Key. The only input it requires is a "Prefix". The default Output is "Prefix+number". This setting cannot be modified with this step.

2020-01-24_11h14_42.png

Get Next ID Fill With Pad Char

Get Next ID Fill With Pad Char step can also be used to generate ID, but it has a more customized configuration compared to the Get Next ID step. The inputs required for this step are: "Length", "Pad Char", "Prefix".
2020-01-24_11h20_19.png

For the example below, the Length was set to 10, **Pad Char **was set to '$', and Prefix was set to"CD".

2020-01-24_11h37_33.png

Note

Please note that these steps will create the first ID if there is not one with that Prefix.

Resetting Counter for ID Generation

In some use cases, Users will want to reset the counter for the ID. Navigate to System > System Data > ID Generation.Find the "ID Generation Key" that corresponds to the prefix defined in the IDs that need to be reset. Right-click and select Edit.
Edit the object and reset the ID property to “0”. Any ID prefix generated for these objects will now continue to count from the set value.

resetting count on ID generation Jan 24 2020.gif


Get Next Number 

Alternatively to the Get Next ID step, users may utilize the Get Next Number step. This step operates by generating a sequence for the user-defined prefix in SQL Server.

The step interacts with SQL Server by increasing the prefix sequence's value each time the step is ran. The step's interaction with SQL Server helps prevent the possibility of duplicate IDs from being generated. 


Glossary Entry 

Step Name DescriptionLocationInputs/Outputs 
Get Next Number Generates an increase numerical value (Int32) for the user input prefix. Interacts with SQL Server to prevent duplicate Output. Integration > Internal Services > IDGenerationInputs: prefix [String]

Outputs: Output [Int32] 


Use Case: Used to generate numerical ID variables. Can be useful for assigning a Unique ID to a user within an environment. 


Example 

To use and configure the Get Next Number step:

  1. From the Flow Designer, navigate to Steps > Integration > Internal Services > IDGeneration.
  2. Attach a GetNextNumber step to the Start and End steps.
  3. From the Properties of the Get Next Number step, provide a String value under the prefix Input.
  4. Save the Flow, then click Debug on the Top Action Bar. Then select FULL. 
  5. From the Debugger, select Get Next Number > View Input/Output Data; verify that the step has Output an Int32 value. 


Was this article helpful?