Adalo - Generate Random Number and Letter Codes, IDs, Passwords, Etc

11 Likes

That’s awesome. Might be bad if they have an outage. There is a unique ID generator in Adalo Marketplace but not as flexible.

Fantastic tutorial, going to be incredibly helpful, thanks.

Thank you for this helpful tutorial

Hey @pford, I wonder if you’d have a quick look at my implementation of your tutorial to randomly generate a number? (in my case a referral code)

I’ve followed the tutorial exactly but for some reason I’m not able to select the custom action output to update my user.

I’ve created my custom action as follows:

The test is successful (i’ve removed the phonetic output…don’t need it)

I’ve added the custom action, updating the magic text fields, to a button above the ‘Update user’ click action

But when I try to update the ‘ReferralCode’ field I don’t get the ‘password’ option from my custom action at the top (if that makes any sense)

I’ve created a couple of custom actions to check if there’s anything I’ve done incorrectly and I get the same result. I’ve created the custom action without any magic text variables to remove any ‘complications’, still nothing…

Any thoughts on what I’m doing wrong?

Is this by chance an action upon a screen load?

No, initially it’s as part of a user registration, but I’ve tried to reduce the complexity and simple have the action attached to a test button on one of my existing screens.

Gotcha. I think you need to make the referal code a Text field instead of a number field so that it can hold the code.

2 Likes

Ah, I wonder…
I’ll give it a go and report back…

You’re a legend!
It was because it was a number field!

Thanks for the help (and the tutorial)

1 Like

This is much better to generate random 6 digits only. Because the tutorial above saves the password as text, not as a number.