I’ve created an action to display the results of random choices from different lists. The action itself works when run from the Workflows tab - adding a new row and then setting row columns of that row.
When I run it as a button in the Layout tab, it only adds a row, then says “no rows to set columns in”. I don’t know what the disconnect is, I’ve tried using a Wait action or even a Wait for Condition action but it’s just not working when I press it from a button.
Can you provide some screen shots that show how your action is configured?
From your description, two things strike me as a little odd:
- Firstly, if the goal is to just display random values from existing data, why is it necessary to add new rows?
- Secondly, using a Set Column Values immediately after an Add Row action to try and update values in the newly created row is generally a bad idea, and has been known to not work reliably.
1 Like
Thanks for your swift reply! I’d read about the Add Row → Set Column Value issue, but I can’t think of any substitution for what I’m trying to do.
For more context, this is what I want it to be from the front end. It’ll generate random settings for me and then I can view my generate history and favourite entries I really liked.
In the image below, I want to add a row, set column values to generate the random setting, and then set column values again to copy the data to static text columns. The front end then shows the static entry, which lets me keep a history of entries.
As for the data randomizing itself, I’ve followed ThinhDinh’s tutorial. This is just a snippet as the data sheet is super long but every variable has these columns:
Thanks again!
Hi, Daniel!
As i understand your explanation, you want to setcolumn on newly added row, but in your screenshot i see you trying to setcolumn in this row instead you firstly must to store the row id of newly added row to some column in the user row and then create single relation from those user row id to real row id and use this relation in next setcolumn.
Also try to reset row id in user row before do add row
After add row provide wait conditions relation is exists
2 Likes
This worked! Adding the exact steps I took for when next I forget how to do this:
For the data:
- Added Row ID to my data entry table
- Added ‘Fake Row ID’ text column to the User Table
- Added a single relation column in the User Table where the value in ‘Fake Row ID’ matches the value in Row ID from the data entry table
For the action:
- Set Column Values - clear the value of ‘Fake Row ID’ in the User Table
- Wait 3 seconds
- Add Row and Set Column Values at once - write the Row ID to ‘Fake Row ID’ in the User Table
That’s seemed to fix everything, the button works, my randomized outputs are saved and they don’t keep recalculating when I refresh the app.
Thanks so much for both of your assistance on this!
2 Likes
Have you tried without step 2. Wait 3 seconds?
Or decrease to 0.1 enough?
I have tried lowering the wait time, but I’m using date/time as the seed for the random number column. That only updates every 10 seconds, so i’ve set it to 3 seconds to prevent duplicate settings being generated.
I’ve managed to butcher something in the interim however. In the published app, I’m not seeing my button and every generated setting is just the first row in each list. Started happening after I deleted all of the past entries.
How you taking the seed? I think, if you will do set column with current date-time(now) and use it for seed it will pure different for every clicking and in this case you no more needed for wait x step 2.
1 Like