I have a table that basically lists instructions in one column (We’ll call it “Instructions”), while the next column contains Y/N to track the completion of these instructions (We’ll call it “Completed”).
The purpose is for the user to be able to check off the ‘Completed’ column when they’ve finished the given task in the ‘Instructions’ column. My objective is to have a button that can be actioned to reset the ‘Completed’ column so that the user can make their way through the list of instructions repeatedly, and keep track of their progress each time, without having to manually reset all of the individual Y/N.
This is probably a simple task, but I’m having a mental blank on how to accomplish the result. Thank you in advance!
How does your user interact with the rows? Do they select each row and then update it in a Form? Is there an Inline button? Do you use Table Quick Edit mode?
Your “Reset” button will need 2 actions:
-
Create an action of type “set the values of some columns in this row” that is designed to “blank” out your Y/N column on that row - and “reset” any other columns needed.
-
Create an action of type “execute an action on a set of rows”. This is your button action. Set the Referenced Rows to an expression that selects all the rows in your view. The Referenced Action will be the action in 1) above. Set the table sources according to your needs. Assign Display properties.
What might be problematic is button placement. The actions as described above are considered “row level” actions which means they should be displayed on a row - e.g. Details view or as an Inline button on a row. It cannot be shown as a “floating” button on your Table view that shows the checklist rows (though many of us have argued an “execute an action on a set of rows” is NOT and should NOT be considered a row-level action in certain usages).
If you have some kind of Parent row for your checklist, then you are all set. For example, maybe a row labeled as “XYZ Checklist” and when tapped, opens the list of checklist questions. Use that Parent row as the source table in action 2) above and place the button on that Parent row.
If you do not have such a Parent row, then my suggestion is to make the action an Inline action that shows on each row - even though when tapped it will “reset” all rows. Not the most ideal of solutions but will work.
I hope this helps!
1 Like
Steps to Create the Reset Button
-
Go to AppSheet Editor
Open your App and navigate to the Behavior section.
-
Create a New Action
- Click on “Actions” and then “New Action”.
- Set “For a record of this table” to your table that contains the “Instructions” and “Completed” columns.
-
Configure the Action
- Action Name: Reset Completion
- Do this: Select “Data: set the values of some columns in this row”.
- Set the column values:
-
Apply to All Rows
- Instead of modifying a single row, create a Grouped Action that applies this change to all records.
- Create another “Execute an action on a set of rows” action:
- Referenced Table: Your table name.
- Referenced Action: The Reset Completion action you just created.
-
Add the Action Button to the View
- Go to UX > Views.
- Select the view where you want the button to appear.
- Add the Reset Completion action under the “Actions” section.