I am trying to create a unique 4 digit number for each user that signs up for an account. I have used Calculate Random String to create a four-digit code when the user signs up. However, I am not sure how to make sure that the code created is not already in the list of all the Code data. How should I approach this problem?
Instead of putting that âCalculate RandomString:converted to numberâ straight into your Code field, as seen in your image above. Put the calculated 4 digit code into a custom state before hand. Once you have that, you can then do a search for the custom state value and only use it if itâs not already found.
Only problem is that if the chances of a randomly generated 4 digit code has been generated and used before, then youâll have to handle that.
In the formatted text part, value for Yes is just Index code, value for No I left blank. It might be good enough for what you need or there might be a better solution to handle this but hopefully this may get you thinking into other ways to tackle it.