Freeze App Formula - Random Number

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?

0 6 368
6 REPLIES 6

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.

Bahbus
New Member

Just do an uneditable Initial Value, but that doesnโ€™t allow โ€œrerollsโ€.

Thanks for helping with some ideas!

Bahbus
New Member

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.

Top Labels in this Space