Time stamp update

Is it possible to get the time stamp to update every time something is edited using the special value

1 Like

Or is it possible for glide to do the Timestamp with just the date?

As long as you are using the special value in you edit screen, it should update the date in the sheet anytime something changes. Iā€™m not aware of an option to only store the date without time. If you need to display the date just the date elsewhere in your app, you can always create a column and use
the following formula to format the data without time.

=ARRAYFORMULA(TEXT(D2:D, "MM/DD/YYYY"))

Iā€™m not sure I understand. I need a timestamp when a checkbox is ā€œcheckedā€ (struggling with for 2 weeks). Is this what is being done with ā€œspecial valueā€?

2 Likes

Depends, are you filling a checkbox in add/edit/form mode, or are you in detail view mode with editable components? The Date/Time Special Value is only available in add, edit, or form mode (adding or editing an entire row). I think in detail view mode, only one field is updated at a time.

I donā€™t follow the question Jeff. If the checkbox is filled from within the sheet (click on the empty check box to fill in a check mark) then the script I wrote works perfect and the date/time is entered in a cell.
If I use the Glide app to check the box, the script doesnā€™t work/run.
My Sheet

2 Likes

My apology. I sent the wrong link to my sheet:
Corrected share link

Whatā€™s your event type for your trigger? Have you tried ā€˜On Changeā€™ instead of ā€˜On Editā€™ for your trigger? I use scripting sparingly and most of my scripts rely on data entered into the sheet manually, do I donā€™t know if I would have the same problem or not. There might be a less desirable and more complicated way to do this within the app, but try changing the trigger first. You could use a timed trigger as well, but timeliness looks to be vital for your use.

I have attempted ā€œonChangeā€ but apparently that must be used with a timed trigger? Apparently Iā€™m running circles and have gotten tripped up with how to use onChange.

Are you just using a trigger with the script code itself, or are you going through the Current Project Triggers option and setting it up that way? Iā€™ll admit, I do not use scripting a whole lot, so Iā€™m not overly familar with all the ins and outs of what works and what doesnā€™t work when data is update within Glide.

Capture

I am a beginner with scripts as well. Didnā€™t mean to mis-represent myself.
Trying to use Current Project Triggers.

In the interest of making this work short term Iā€™ve changed the easy Switch selection (really the best way to accomplish what I need) and turned them into Date/Time entries. Not clean as it requires a 2nd button push by the user (must click ā€œsetā€) but I need it to work.

I just tried it with one of my apps where I use a form button to create a new record. That triggers the onchange and runs the script to copy the value to another sheet, so as far as I can tell, it should work. An alternative would maybe be to split your switches into seperate sheets, set up relations to those sheets and create an inline list that links to each sheet. Then when you open up the list item, you can click on the pencil to edit the switch. That will allow you to use the Date/Time special value to automatically fill in the date related to that switch. Itā€™s a really ugly solution and your use of dates instead of switches is probably a better solution in this case. With your scenario, I would press on with trying to get the script to work with the trigger.

Thanks Jeff. I ended up giving up on the triggers. Couldnā€™t make it work with the Arrayforumula and referenced sheets.
I went with Date/Time value and formatted accordingly in the sheet.
Not elegant like simple on/off switches but it works and I needed to move on.

I really appreciate the help.

Maybe someday Glide will add new functionality in the future that will work for you. Or maybe youā€™ll come up with a new idea that will work better. Apps will always evolve. I wish you luck.

Same problem. Please revert if you have found a solution.

I have a sheet that uses onEdit(e) to write date/time when a record is changed/updated and all works as long as I update via the sheet itself. However, when I use my Glide App and edit a record, the record updates but no date/time is added or updated.

Why not use the date/time special value in glide to automatically update the timestamp on the record? Then you donā€™t have to mess with scripts.

If you would rather use a script, I would use an onChange trigger instead.

Jeff thanks. I am new to Glide so donā€™t know about the date/time special value and how to use itā€¦that would be great as I was not wanting to use scripting.

Jeff,

Thank you. If I understand this, I must use a form. I currently have the timestamp field in my google sheet and want to update that with the date/time but not sure how to add the special value to the edit screen for that sheet? My app allows only me to update the fields that are associated with the list of 22 items that remain static. Example: EURUSD is part of a list of 22 currency pairs and each has a direction field and target and timestamp. The EURUSD portion is not editable and when I update the Direction and Target I want that timestamp field to automatically update. Hope that makes more sense. Sorry for the novice questions but promise to learn from this as I go!

Jerry