You are viewing limited content. For full access, please sign in.

Question

Question

Forms - Fill date/time field when a different field is updated

asked on January 12, 2022

Hello,

Can a date/time field in Forms be auto-filled whenever a different specified field is updated/changed? If it's something that can be done with Javascript, does anyone have a code snippet they can share that accomplishes this?

Thanks!

0 0

Answer

SELECTED ANSWER
replied on January 12, 2022 Show version history

A Date field can be auto-filled using the built in Formula feature.
If in the Date Field Formula you specify NOW() or TODAY(), it will put in Todays date when the IF statement is met.

example: 

Each time the formula is reevaluated (ie: value change) then the Date field will be updated

1 0
replied on January 12, 2022

Perfect. Thanks, Steve!

0 0
replied on January 13, 2022

Hey Steve, wanted to bounce something else off you. Say I want to do something very similar to this, but with the possibility of 2 different fields triggering this. So it could be field A, or it could be field B that gets updated and when either of them do, we fill the date/time field with NOW(). Can I include an OR statement within a single IF?

0 0
replied on January 13, 2022 Show version history

Yes, it would look like

=IF(OR(Total>0,AnotherField="ABC"),NOW()," ")

The conditions in the OR are separated by the ",". You can have as many OR conditions as you want. Same for AND

=IF(AND(Total>0,AnotherField="ABC"),NOW()," ")

1 0
replied on January 13, 2022

Awesome. Thanks so much!

0 0

Replies

You are not allowed to reply in this post.
You are not allowed to follow up in this post.

Sign in to reply to this post.