What is the easiest way to reset a flag for each row in the table

I have a single table (Shopping list} and after I’ve shopped, I want to reset the column [Buy] back to “n” for all rows.

Can I execute this from the menu drop down?

Thanks.

Welcome to the community!

First you should create an action that will operate on a row of your Shopping List table. This action, let’s name it resetColumn, will just change the value of the “Buy” column to “n”.

Then you should create another action, let’s name it resetRows, which will launch the first resetColumn action on all rows of your table.

The resetRows action in your case can be triggered by:

  1. A button displayed in your Shopping List view

  2. As a Form Saved action, once you save a form, the action gets automatically launched

No, it cannot be launched directly from the dropdown menu.

2 Likes

Thanks for your quick and clear response, I’m nearly there. But what precisely do I put in the Reference Rows field.

1 Like

You should put the expression that will return all key column values in the table:

Shopping List[keyColumnName]

1 Like

OK, so schoolboy error on my behalf - you may laugh - innocently I called my table “List” - the confusion with the expression “List” was my downfall :slightly_smiling_face:

I really appreciate your assistance.

1 Like

No problem, welcome my friend. You are right, one should avoid naming tables and columns similarly to AppSheet’s own functions, it confuses the app :slightly_smiling_face:

1 Like