First of all, I set up a market system in the application and the things I sell are “Keys”. Can a system be made that automatically sends keys to the e-mail of the person who buys keys from my store?
Keys can be used 1 time and unique keys must be sent sequentially.
Also, the codes do not belong to me, I cannot create them, I can send pre-generated codes
I will send it.
The codes submitted must be different from each other. Otherwise, it is invalid, a code cannot be used more than once.
Please don’t be angry, understand me.
But how can I create this list? I need to change it remotely, so tell me how to create a list and send the code when sending an email.
Create a Column named Alpha1 (Dummy), and store a-z values in it. Example : a, b, c, d, e…
Create another Column named Alpha2 (Dummy), and store A-Z values into it. Example : A, B, C, D, E…
Create another Column named Integer (Dummy), and store numbers into it. For example, you can finish adding max of 100 numbers (1 to 100).
When Screen Initialize, call all these columns & store each column values in a separate list. Example : Store values of Column Alpha1 into a list named List1, Store values of Column Alpha2 into a list named List2 & Store values of Column Integer into a list named List3.
Now, create create two more variables in your app named Old Keys (is an empty list) & New Key (socketed with a blank text block)
For example, when Button1 click we’ll generate a new key each time (with a quick look into our old keys to ensure we get a unique key each time), to do so, use For Each Number block.
{For Each Number <From 1 to 15 (your key length) by 1>
Do <Set New Key to {Join :
(Select List Item from List List1, where index is Random Integer from 1 to 26)
(Select List Item from List List2, where index is Random Integer from 1 to 26)
(Select List Item from List List3, where index is Random Integer from 1 to 100)
Check if the newly generated Key already is in the Old Keys list. To run the check:
Drag If Contains block from Text section.
Socket Old Keys list into Text section of that block. And New Key list into the Piece section.
If check = true, show alert that user have to generate a key again. If False, Show the New Key to user and allow them to proceeded with further process & add item to list Old Keys, Value is get New Key.
Follow :
I know example blocks could help you much better than this explanation, but I’m unable to do so for now! Sorry for that.