Question. How to create a reset feature?

I have created a check list of 199 inspections. For each inspection there’s a “completed by” and “notes” if anything was found during the inspection.
After all inspections are completed, I would like an option to reset the form to blank on the “completed by and notes” section that way it can be used again. On the form I just need the inspection number and the inspection description available all the time.

0 10 412
10 REPLIES 10

Please explore below

  1. Add a number type column to the table called say [Reset Inspection], initial value zero.

  2. In each of “Completed by” and “Notes” columns’ “Reset On Edit” setting, add an expression

[_THISROW_BEFORE].[Reset Inspection]<>[_THISROW_AFTER].[Reset Inspection]

  1. Add an action called say “Reset Inspection” of type “Set the values of some columns in this row”

Set [Reset Inspection] to [Reset Inspection]+1 in this action. Add a suitable confirmation message.

Whenever the user taps on this action, all the “Completed by” and “Notes” columns will be reset to their initial value.

Thanks for the help. It worked up to a certain level. I am not expert on computers and that’s why it took me some time to figure it out. since my App consist of 199 inspections, once I’m ready to reset my app back to inspection description, I have to reset one by one instead of one click of a button and all inspections would reset at once. I tried to send a picture (actually is a PDF sheet) of of my project but it does not allowed me to share. is there something else I could try to reset all at the same time?

It is not exactly clear how you have implemented the configuration. The suggestion of action will work for all fields resetting in a record, assuming all inspection questions are in a single record.

Are your each of inspections in a different record?

No sir. It’s on one record only. (I’m sending this pictures, I’m not sure if they can be seen)

Here’s the second picture.

Thank you. Could you update how many ctotal olumns your inspections table has? And what type of views you have shared. The second picture appears to be of detail view with a single question in the record.

Yes sir. I have 5 columns. The last one is the “reset inspection” on this template I have just 5 questions instead of 199 to test the app and work all the glitches. Here’s a picture of what questions look like( it only shows numbers for now until the final product)

I think what you call as columns are actually rows.

In that case you could use reference actions to reset those multiple records. However using reference actions to delete as many as 199 records may not be a good idea.

Please take a look at the below sample app on reference actions.
https://www.appsheet.com/samples/This-app-shows-how-to-use-reference-actions?appGuidString=e76d2e73-...

Also you may wish to take a look at the sample apps section to get an idea of how typically inspection apps are configured in AppSheet. There are many sample apps in that category with link as below.

https://www.appsheet.com/Support?q=inspection&hPP=10&idx=help&p=0&dFR[doc_type][0]=Apps&is_v=1

Reference reading

Also wanted to mention following even though the above suggested approach will work for the question you have asked. You may also have specific reason for resetting the previous inspection performed. However, you may wish to note the following.

With resetting feature, there will not be any historic record of inspections performed with respect to the inspection number that will remain static.

A more generalized approach is to use a parent /child relationship wherein all inspections on a specific equipment/inspection number can be saved in child records. The app logic can choose to show only the latest child record of the inspection performed by using slices and other approaches. This method will preserve historic records.

https://www.appsheet.com/samples/This-app-shows-how-to-get-the-most-recent-related-row-for-a-table?a...

Top Labels in this Space