I am currently creating an ID identifier of a session, for that I use the function RAND(111111,999999), then I save that value in the database, so far so good.
To the above I want to add this:
I concatenate the RAND function with the user ID, but the platform does not concatenate two integer and I do not see a function to concatenate, how can I solve it?
Thank you very much, I will be attentive to your answers.
using text properties instead of number properties to store your ID’s, you will not be making calculations with’em so why use number property?
using the randomizer component, put it on the screen you capture/create the ID on, add an invisible input then add an action to the randomizer (change input value>select the invisible input>“on value” select >randomizer then the option that suits you(in your case I guess unique ID will be great, it’s not a number it’s a string of letters and numbers)
Add an hidden Input. The Input default value = RAND(111111, 999999).
On the Update Action :
RandNumber=Hidden Input
IDIdentifier = (Hidden Input)(ID)
Condition to do the action (“When does this happen”, at the end of the action)
All Users > Count
CUSTOM FILTER (ADD):
Current User > RandNumber IS EQUAL TO Input RandValue
IS EQUAL TO 0
This mean that the RandNumber is already in the database (count > 0), the action will not be done.
Amber I was reviewing what you mention, but I have a doubt:
How can I apply that same, but at the moment of creating the record in the DB, at that moment I would like to generate a code that does not exist in the DB. Will it be possible with Adalo?
Hello, well you can then create a collection called “Codes” and then add a condition to the RAND function action in which the codes=> count, then add a filter. Now make the filter in this way (Code is equal to generated code). Then write “0” in the number section below.