Alrighty, so in the FORM I want to generate a random number, but I want the user to effectively be able to roll the die, getting a new random numberโฆ How could I randomize it, but โfreezeโ it from changing?
In a FORM, you certainly cannot activate an action upon request. I cannot think of any way you can work around this.
Could you make this a two-step process? An action that generates and saves the random number and then launches into the FORM and picks up the saved random number. And if you DONโT need to re-generate the random number, just simply launch into the FORM.
Maybe this doesnโt fit your needs? If not, could you elaborate on when you need to be able to re-generate a random number?
Currently Iโm clearing a cell, and then using an on save action to post the value static backโฆ But was hoping to find something more elegantโฆ
How many times would a user possibly โresetโ the number during a single FORM session?
You could have multiple columns to hold random numbers, with the same Display text, so the user doesnโt see a difference. All of these columns generate upon entering the form. Then have some sort of โreset toggleโ field with a yes/no or enum or something that simply shows and hides different columns.
Upon saving the form the random number can be saved to a static column.
Use a virtual column to display the current โactualโ value.
Just do an uneditable Initial Value, but that doesnโt allow โrerollsโ.
Thanks for helping with some ideas!
Another alternate idea: a separate table to generate this data, once confirmed transfer to the working table where the value is not editable, and then wipe this temporary generation table and lock from going back to it.
Iโm thinking of it as if I was generating a character for a game.
User | Count |
---|---|
35 | |
35 | |
27 | |
23 | |
18 |