Skip to main content
Mitratech Success Center

Client Support Center

Need help? Click a product group below to select your application and get access to knowledge articles, webinars, training content, and release notes or to contact our support team.

Authorized users - log in to create a ticket, view tickets status and check your success plan details.


How-to Generate a Random Integer upon initiating a workflow

Random Integers cannot be generated outside of a Case Statement. The case statement requires a triggering event of some kind, whether that is user input or Form Mapping. Below is an example of using form mapping to generate a Random Integer without user interaction.

First Step

You’ll need two text fields, one for the form mapping and the other for the formula.

random integer1.png

Second Step

Create a formula with a case statement that creates a Random Integer in all cases.

The isDefault() method checks if element4 (the text field with form mapping) is Empty.


random integer2.png


The Randint() method generates a random number between the first and second number provided as parameters.


random integer6.png

Third Step

The form mapping is set to map without parent value and sets the child (element4) to the string value entered in the field “Child form value” as soon as the workflow request is initiated.

random integer3.png

Fourth Step

Element 4 is just used to trigger the formula for the Random Integer. This can be hidden from the user with a Condition that Hides the Form item in all cases. Make sure to check the box to “Submit even if element is hidden”


random integer4.png

Expected Results

When the workflow is initiated you will see the random number generated automatically without human interaction.

random integer5.png


  • Was this article helpful?