Reset on Editing


I am creating a driving dispatch app from scratch using AppSheet. When a driver arrives to a destination, they have to answer a few questions then indicate whether the shift is over. If the shift is over I would like all the questions they answered for every destination they visited during that shift to be reset. I tried playing with the Reset on Edit formula but nothing worked. I also tried playing with data slices but couldn’t find a solution. If any admins would like to look at the app it is Clipboard 0.3.0. Thanks.

Any solution is entirely dependent on how your app and data are structured. How are they structured?

Here are screenshots of my columns.

1 Like

There are multiple rows per driver per shift?

Yes one driver has multiple stops

And you want to reset the existing rows, rather than just adding new rows the next shift? Resetting the existing rows will lose the information the contain. Is that what you want?

As long as the information is recorded in a row in the back end, I want the driver to “finish” their shift and answer the questions again on their next shift.

Then you shouldn’t need to do anything.

What type of view is the user using to record their daily activities?

The user is using a form. After they fill out the form the fields stay populated no matter what. I want the driver to come back later with a blank slate.

How do you envision (a) the data being saved, and (b) the driver getting to the blank slate?

The reasons I’masking theses questions is because the common design and use approach to AppSheet apps would seemingly deliver the behavior you want, but that you’re expressing the challenges you are suggest you aren’t using the common approach, so I need to better understand your approach.

I envision the data being saved in Google sheets and the driver getting to the blank slate when they mark themselves as having completed the shift.

With a form, the data is saved when the user clicks Save. The user must reedit the same row to update the day’s form with new data. To start a new day, the user add a new row. Is this your thinking?

Yes! How do I automate the user adding a new row so that they log in for a different shift with a blank slate?

In a simple app with a table view, the user can add a new row by tapping the plus button, or view & edit an existing row by tapping on the row in the table.

(Ignore the columns and data listed: it’s from my generic example app.)

Would this meet your needs?

The drivers have to edit the same row over and over again because they will visit the same locations over and over again with each shift. Thank you.

Is this the same issue as here?

Given the extra details you provided, you’re probably looking for a many-to-many relation setup.

Many stops (on different dates), linked to many locations.
To do that, you’ll need to add an additional “linking” table, which will reference both original tables.

Read more here

And see this sample app


I have three tables, one with all of the client information, another with routes only, and another one with only column headers for writing only. I have set up reference columns. I would like to input entries into the third table for writing only. How should I do this? I will continue reading.

I just realized I really only need two sheets, one for the user to input their answers and the other to transcribe the answers to. The first table will then be “reset” whenever a driver finishes their shift. I’m going to see if I can write a script for this if it’s not possible within AppSheet.

Hi Tiffany!

I believe what you are wanting to do is most certainly available through AppSheets common usage. If your end goal is to save the data for each driver from each shift, then creating two tables and copying/transcribing rows and performing a reset, is a LOT of extra work you don’t have to do.

I think maybe there is a disconnect in understanding where you are starting within the application. It hasn’t been covered here, but my guess based on your comments, is that you have a Form view as the starting view in the application. In your use case, that would not be the recommended approach. I feel this is creating confusion between what you are seeing and what is being recommended.

The normal usage for what you are trying to achieve would be:

  1. Set the starting view as a Table View or a Deck view.
  2. Tap the “+” button to launch the Form for a new shift.
  3. Enter data and Save to create a NEW row.
  4. Tap that newly added row in the Table/Deck view to EDIT it for additional information for THAT shift.
  5. At the start of a new shift, tap the “+” for a new/reset Form.

Does this make sense and does it help you at all?

1 Like

Thank you John.

Won’t this approach overwrite the data over and over again without any saving? Because that’s what I’m doing right now. I start off with a deck view, then select a location and go to a form view.
If the questions have never been populated the driver can proceed normally. If the questions have been populated the driver has to overwrite data in order to answer the questions again.

In this screenshot the driver can proceed normally. But after their shift is done, they have to overwrite the data in order to answer the questions again. Do you see how the questions are already populated here?

I think this is a back-end issue with my Google spreadsheet that I have yet to figure out. I tried using the importrange function and a change log using the over-complicated approach described above but the change log doesn’t record changes made with the importrange function.