Hy, I'm developing my first application with Saltcorn to get to know the tool and I'm really enjoying it. I am currently encountering my first difficulty.
In my application, when I add an item to the database, it automatically generates a field like: [email protected], so that I can generate a temporary email for each user who registers in the system. For this, I used the String option in the temp-mail field and the "Calculated" option, but I have no idea how I can do it in the Formula to generate this.
I googled for Genarete Hash Saltcorn and found a method for generating passwords, but it didn't work: generate_password()+"@multiti.com.br"
Would anyone have an idea how to go about this? As a last resort, I thought of uploading a table with thousands of random emails generated via shell in Linux and ordering it to get it from the bank, but I found this option to be a great kludge.
Thanks in advance for the help.
I solve this problem using in Formula this code: Math.floor(Math.random() * 65536000)+"@cliente.com.br"
Is not the bast way to do this, but works. =)
Sory, dont works. With each insertion, the database changes this email. =(
Problem solved select the options "Calculated" and "Stored" on the field creation.