After reading this article you'll learn how to:
Install the UUID step from the block store
Configure the UUID step
Use the step in certain use cases
Starting off
The UUID step is created by Betty Blocks, but it's not readily available in the standard set of steps within the action builder. But that doesn't matter, you can find it and install it from the block store. To do this navigate to the block store and search for 'uuid' it will pop up as the first hit.
Click on view details
to check out what the block is about. In our case, the step will explain that you can generate a unique ID with a specified length. This tab also lets you install the block into one of your applications. Simply hit the Install block
button and select your organization followed by your application.
After installing the 'generate UUID' step, it can be found in your action builder of the application that was selected. You'll find it in the miscellaneous section of the action steps.
Configuring the step
Now for this example, let's keep things as plain as they can be. I've prepared a model called 'Coupon' in which I've created 3 properties:
Checkbox 'Active', required + default checked
Price 'Amount', required
Text (single line) 'Uuid, requires + has to be unique
Then a simple page in which a form is present for this model, a user can give the amount of a coupon and then generate it. The action that's attached to the form will generate a new coupon with the amount the user has filled in and generate a UUID for the coupon to ensure it's unique. The page looks like this:
When we check the action it looks as follows:
As you can see for the configuration of the generate UUID step the only thing that we need to do is give a result. The result will contain a randomly generated UUID, we can then use this UUID in the create step to create a new coupon.
In the image above you can see that we use the 'generated_uuid' variable (the result fo the generate UUID step) in the create step. Once the coupon is created the UUID will look like this:
Use cases
Below are links to some articles that make use of the 'generate UUID' step in their use case, some of these will use the 'generate random hex' step. Both steps function similarly, so when you see the latter step being used you could simply replace it with the 'generate UUID' step and it'll still function the way it does in the use case.