Implementing a log and history

Hi Again

Need some guidance. Scenario ROADSIDE ASSISTANCE app

You breakdown and request help. The company opens a case and assigns a driver/truck to you and also updates the status.

  1. If they need to change the driver, what is the best way to keep a history of the change, currently the assigned_driver field is getting changed and I have a last_modified field. Is the best way → just use custom action to write the data into history table and create a row before I write it into the live case table column

  2. Similar to the above, I want to write notes on the case. As multiple call agents may be working the case, they need to see previous notes (who made them, at what time) what is the best way to implement this. I suppose I can do the same as 1 above, but in this case how do I display all the notes in a single area/component/page, trying to avoid creating lots of elements/buttons one for each note and you have have to open up each one ?


I assume you’re using an edit screen > on submit action. There’s no easy way to do this since an on submit action on an edit screen has no way to get the “previous” data.

What you can do is use a special button, not linked to an edit screen, but to a new screen where you have an entry writing to a user-specific column. When the user decides to save the change, you add a new row with the current deriver AND the user-specific column to a new sheet, then set the user-specific column to the driver column to commit the change.

It goes something like this:

"Edit driver" button:

Step 1: Set current driver column to user-specific “Driver edit” column.
Step 2: Navigate to new screen “Edit driver” (has only one text entry/email entry column on the screen)

"Save driver" button

This button only appears in the “Edit driver” screen and visible when the user-specific column is not empty.

Step 1: Writes “Current driver” column and “Driver edit” column to Logs sheet, “Change from” and “Change to”, respectively, also a timestamp if you want, and the person who changed it.

Step 2: Set the “Driver edit” column value to the “Current driver” column to commit the change.

Step 3: Go back to the previous screen.

1 Like

This might be a little bit different, I would use a form to write to a new Sheet, then use a relation to display those notes in an inline list.

If you don’t want too many clicks I assume you can do a template in the Notes sheet, combining the agent’s name, the timestamp and the content, then join them together in the cases Sheet with a join text column, delimited by a new line character.

It would be something like:

Agent A (11 Sep 2021 07:00):

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean euismod interdum lectus, sit amet molestie quam molestie ut. Ut viverra arcu velit, non dapibus nisl iaculis non.

Agent B (11 Sep 2021 08:00):

Cras in dolor erat. Maecenas vel odio ultrices, ultricies augue vitae, pellentesque nunc. Donec maximus ante enim, eget molestie neque tempor at.

1 Like