Reset Values

tvinci
New Member

Hello,

I have a form in my app that allows users to input values and upload a picture. How do I reset these values and this picture every 8 hours to allow for repetition?

Thank you.

0 9 570
9 REPLIES 9

Any automated action you need done on a regular basis is a โ€œReportโ€ Behavior.

However, Iโ€™m not understanding your issue here. Why do you need to โ€œresetโ€ anything? Adding a new record will always open up a blank form. Are you wanting to delete records?

tvinci
New Member

Hello Marc_Dillon,

The first time a user completes the form, I want them to input values in a row in the spreasheet back end. Then every 8 hours, they can insert new values into another row of the spreadsheet back end because the form fields are blank again.

Thank you.

I think more detail and context of your situation would greatly help to give you a better suggestion.

It sounds like we need to start by first recording the user and the timestamp in your table. thatโ€™ll require two hidden columns with initial expressions of USEREMAIL() and NOW().

Then we can use an expression as follows to determine if the user can enter a new record.

COUNT( FILTER( Table , AND( [user] = USEREMAIL(), HOUR(NOW() - [timestamp]) < 8 ) ) ) = 0

Now where are we putting this expression? Iโ€™m not sure what is best for your situation given the lack of detail. We could start by putting it in the Show If field of the Form view.

tvinci
New Member

Thank you @Marc_Dillon.
The context is a driverโ€™s app where drivers record details of their pickups in a form on the app. There are multiple shifts and multiple drivers completing shifts in the day. The same location may have multiple pickups in one day. Thatโ€™s why I want a driver to submit the information then have access to a blank form again.

Thatโ€™s just how the app works in general. The form will be blank whenever one adds a new record.

I read this situation as youโ€™re wanting to limit the number of records each user can add to only 1 per 8 hours.

@Marc_Dillon

Right now when a driver submits a form the data is saved and visible within the app.

So youโ€™re not wanting drivers to be able to see any records, just submit new ones?

You might be wanting this?

tvinci
New Member

I tried what you suggested and my app became empty. I want the drivers to be able to see the locations, fill out forms concerning the locations, then after they fill out the form have the form revert to being blank, but they can still see the locations. Thank you.

I would suggest that you continue to read help articles to gain a better understanding of basic app designs and data structures. This is a good place to start.

Can you please describe your data structure. Posting any relevant screenshots of the spreadsheet, the columns view in the editor, and the app views that you are referring to will help immensely.

Top Labels in this Space