Need Timestamp upon Form Save

Howdy! I need to have a Timestamp enter into [SaveTime] exactly when my Form is Saved.
I had this working a while ago, but now it does not enter the time and I forget how to set this up…DOH!
Thank you Appsheeters!

1 Like

Hmmm… easiest way (for the user, maybe not to implement) that I can think of would be the following setup:

  • Create a column at the end of the form, set it to Enum, and make it a single option of “Save” - make it required, this then takes over the work of the actual save button.
  • Create a ChangeTimestamp that’s watching the Save_Enum column - when someone presses the button to save, the timestamp is recorded
  • Finally, for the form you’ll need to set the Auto-Save feature on - this way when they tap the last field of the form (the save button) the form closes automatically.

Another way you could accomplish this would be to create an action to set a timestamp and include that in the form save event - so when the form saves, the action is triggered and the timestamp is set.

You could put the action on a workflow, also, if you don’t want the sync from the action to get in the way - what I mean here is that if you include the action in the form save event, it becomes a sync event (one for saving the form, another for setting the timestamp); if you move the action to a workflow, this happens in the background and you only get ONE sync. (Just fyi :nerd_face:)

2 Likes

SOLVED! Thanks Matt, and sorry to have wasted your time. I should have searched before posting this question because I have already asked this and got a perfect response. I now remember how I had this working, it was using the Action to set my [SaveTime] column to “NOW()”. Worked perfectly before, not sure why it quit but I’ll just set it up again. Thanks again, and BOY do you type (and think) FAST! Haha. Thank you for always going (way) out of your way to help others! You’re catching up to Mr Aleksi, but at this point, he would have to take a long nap for you to ever pass him! Haha, jknr
I will leave this Post here so others can see your first option which sounds very useful.

1 Like

Never a waste of time, good sir; and your kind words are appreciated. :blush:

1 Like

Hey Matt, your suggestion from above, quoted below, about putting this Action in a Workflow to avoid 2 Syncs is a very good one. I never realized that using the Action in my Form Save event was causing 2 Syncs, but now I see that it is. It’s funny that an Appsheet person would have told me (in 2018) to use the “Action in Save Event” option, and not the Workflow option. Of course, as a Good little Developer, I want to avoid any unnecessary Syncing or functioning, so I will need to do your Workflow idea. I’ll let you know if I need any details on setting this up, but if you have any suggestions about using the Workflow option, please leave them here. Thanks again Brosef!

1 Like

A workflow rule won’t get you “exactly when my Form is Saved”; it’ll get you when your data is synced. And the timestamp won’t occur in the row until the sync occurs, even on the device from which the form was saved. Funny, that.

2 Likes

Really? Kinda makes sense, if the action is triggered when the workflow runs there might be a delay. Hmmm… I wanna test this now. :nerd_face:


It’s a little long, 5 min, but I have an app with a ChangeTimestamp and I change it a couple of ways:

  1. I create an action to set a timestamp and assign this to the form save event
  2. I create a workflow to run the action

Ultimately Steve is right, if you’re wanting to capture a timestamp it’s advisable to either use the changetimestamp or an action in the form save event;
triggering by workflow adds in the element of a delay that wouldn’t be appropriate for a timestamp, but other data changes (say a status change) would be okay.

CloudApp

4 Likes

Aaaaand back to an Action it is!! Haha! Thank you so much for the excellent and detailed education Mr Steve!!
What I’m doing is tracking exactly how long it takes for my Guests to fill out a Sign Up Form, so I must have the [SaveTime] exactly (within a second or two is fine) when the Form is Saved. Having to have 2 Syncs for this isn’t ideal from an efficiency standpoint, but accuracy here is far more important to me.

2 Likes

Matt, thanks again for your diligent and thoughtful attention! You and Mr Steve are both pretty amazing! #peace2u :cowboy_hat_face::cowboy_hat_face:

2 Likes

I’d like to make sure we’re clear on the “2 syncs” @MultiTech_Visions notes: this just means the app must send two change records to the servers: the form submission, then the row with the updated timestamp. Neither of these transmissions are particularly slow or difficult; you likely wouldn’t notice it happening. Notably, these are NOT the sync behavior you experience when you click the Sync button (which is painfully noticeable).

3 Likes

Haha, cool, thanks again for the clarity, I’ll sleep a little better, not worrying that my double-Sync is clogging up the system.

2 Likes