Random Number Generation
Element Name: Random Number Generation
Category: Variable Manipulation
Description: Generates random numbers.
Functionality: Allows the generation of random codes, which can contain only numbers (numeric) or letters and numbers (alphanumeric).
Configuration Fields for Random Number Generation Action
[Name] Unique descriptor of the configuration box for identification purposes in the flow.
Random Generation Configuration Subset
Note: 📑 For the following group of configuration tags, it is required to have entities previously created. If the entity is not created, you can add it using the "Add entity" button located within the same tag.
[Variable where the random number will be stored]: Corresponds to the entity (previously created) that will contain the number generated based on the seed and length designated later in the configuration. It is recommended to use a variable of type "string".
[Variable that will contain the generation seed]: Corresponds to the entity (previously created) that will contain the value of the "seed" which will be used to indicate the characters or segments that will be allowed in the random generation process, and thus obtain the random number. It is recommended to use a variable of type "string".
This seed will generate results in the range from "0" to "9" and from "A" to "Z".
Note: 📑 To limit the seed to a numeric range, the entity can be configured as: 1234567890 representing the range [0-9].
[Variable that will contain the length result]: Corresponds to the entity (previously created) that will contain the length value of the random number to generate. This value will also be used to repeat the value of the seed variable, being able to generate the random number. Length can be expressed in an entity of type "integer".
-- Example: 3
The entity is loaded into "2". Added to the seed of range [0-9]+[a-z], it can generate a result similar to: "T2F".
Error Handler Configuration Subset
[Error Handler]: Selection box where the intention that will be activated in case of an error in the Force Execution of Cases action is identified. When an error overflow occurs, the entity "Random_Number_Generation_Error" will be loaded with the error detail if it is available.
Note: 📑 To generate a random code with alphanumeric characters, the entities created that will contain the final random number and the seed code must be of type string.
Example of Random Number Generation Implementation
Entities are created:
RandomNumber -> String
RandomSeed -> String
RandomLog -> Integer
RandomSeed <-- 1234567890ABCDEFGHJKLNPQSTUVWXYZ
RandomLog <-- 4
RandomNumber <-- "Z33Y"