Trying to create a function that returns a last updated date when a cell is updated in google sheets

I am trying to set up a script that returns a date when an adjacent cell is updated in our google sheet. I have tried using an OnEdit function, However, have discovered this wont work as the updates to the cell may also come through our app which is linked to the sheet. Essentially, our crews onsite will upload a photo through the app which updates the photo link in a column on our google sheet. We would like the column next to this to show the date “photo link” cell was last updated (or “changed”). This way we can keep track of when the photos are updated for our reporting. From what I have been reading this needs to be set up with an OnChange Trigger. However, I am not sure how to set this up?
Any assistance would be great!

Hi, welcome to the community.

If you can strictly keep the updates coming from the app, what you can do is:

  • Have a latest change column.
  • Use an edit button for any changes needed from the user.
  • Point the current timestamp value to the latest change column.

Would it work for you?

Also, this is not a bug, so I will remove it from the category.

1 Like

Thank you. We will look at this option and see if it will work.

Apologies, did not realize this was categorized as a bug?

No worries about the category! I have removed it. Have a nice week yourself.