How to Edit a Record with Fields that are Auto-Calculated

I have a tracker app where workers will enter some notes to document some interaction with patients, currently being used to log outbound calls for things like attempting to reschedule cancelled appointments and such. In my initial build, I had the initial value of the Start Time and End Time columns set to NOW() but be editable. The main doctor wanted it to be automatically calculated in order to shave a little bit of time off the process of logging, so i still have the initial times of both values set to NOW(), the columns hidden, and a save form action that changes the End Time value to NOW(), which will subsequently trigger the duration column value to calculate the time spent on the task, provided the person performing the task is aware that this is how the duration is calculated.

my argument at the time was that this will ultimately lead to more work anyways because you WILL end up with situations where people are needing to modify these records because they were distracted and may have started the timer to log a call but not actually started the call yet. Anyways, he wanted to roll the app out to a few folks today to start testing, and right out of the gate, this is exactly what happens. I want to move back to manual entry of start/end times with automatic duration calculation, but he would prefer to keep it as is, but allow editing of records.

My initial though is you can't have it both ways, but i may be wrong due to limited experience with AppSheet.

How do i go about allowing users to edit records after the fact? I suppose I can just expose the values, still leave the initial value set to NOW(), and still have the form save action to update the End Time value, but that presents a problem in that it will update the end time value again upon saving the edited form, will it not?

I'm open to suggestions....

NOTE: the patient info in the image is a dummy test patient, no privacy regulations are being broken here

1 4 171
4 REPLIES 4

Is there a filter condition to tell it to only perform the save action if the is a new entry and not an edit of an existing record?

Start has initial value of NOW(), and end is set to NOW() on form save? So the entire duration of the session is spent with the form open? I would say that's just bad design. All time-tracking apps that I've built, you click a button that creates the record and assigns the start time. Then you edit the record details in whatever way you need. Then when you're done, you click an end button.

this is what makes sense to me as well, but i am trying to find a way to appease the request if possible. His idea being the end time is automatically the time the form is saved, but again, my argument is , what if they are not clicking the button at or around the moment they are done. This, in my opinion, is the gateway to bad data. But all that aside, is it possible within appsheet to strip the form save action if you are saving while editing an existing record?

Add a condition to the action that checks if the record exists or not. Like IN( [_THISROW] , FILTER( table , TRUE ) ) or somesuch.

Top Labels in this Space