Save date time value only after click Save

Hi guys,

how can I save the current DateTime in a field only right after the user click SAVE to the form?

image

One way is an “Event action” that writes the value right after when you click save.

3 Likes

How to enable a event action…pls help

#1 - Create an action with “Do This:” > “Set the values of some columns in this row”
#2 - Set the columns value as NOW()
#3 - Open the correct form view
#4 - Select that action with the option Events action > Form saved

2 Likes

Hi @Aleksi ,

that worked perfect! Thanks.

Just a doubt, that field should have the current DateTime after save the form but only if the Status = “Ok”, if Status = “Pending”, the DateTime field should be blank. How can I set both actions to the form? I see I can only set 1 action in the Events Action > Form saved:

image

as in screenshot below you can see you add a number of actions…under the heading Set these columns, to take place one after the other…try them out…in the expression field next to the column header you can add now() as the expression

Screen Shot 2020-03-12 at 9.57.44 PM

This is what I have:

it works fine for that condition: [Status] = “ok”

But the same Field must set value “” if the user set the [Status] = “Pending”

on top of the screen shot below the expression field where you have entered now(), you can see a + icon, click on that to add multiple changes you require to happen at the same time

Yes, that is to set several values, but what about evaluate different conditions? I have to update the same field but evaluating 2 conditions:

if the Status = “ok” > Date Time = now()
but,
if the Status = “Pending” > Date Time = “”

that’s what I need to do. Let me know if I am missing something.

in the date Time column…see to that there no initial value set…set it to blank and just select the appropriate data type…over in the action space…enter date time as now()…this should work

@Geovany_Kelly You can set a condition rule as [Status]=“Ok”. If it’s not TRUE, the Event action is not triggered and nothing happens after the save. Only one Event action is needed.

Under Actions Header “Do This” select Grouped Actions from the dropdown to start with