Skip to main content

Request: Add ability to update date field to "today" or other relative date with button

  • September 23, 2022
  • 3 replies
  • 36 views

Forum|alt.badge.img+8

I’m trying to make a button in my interface that will update a date field to today, but it looks like buttons can only update fields to be a specific, pre-determined date. I wish the function was there to add relative dates like today, yesterday, a week from now, etc.

3 replies

Zack_S
Forum|alt.badge.img+15
  • Inspiring
  • 95 replies
  • September 23, 2022

Hey @Noah_Coleman,

You are right, can’t do it directly, unfortunately.

However, there is a workaround using an automation.

  • In the same table that has the date field you want to set as “today()”
  • create a formula field
  • Enter “today()” as the formula

In your interface:

  • Create a button that triggers an automation
  • When the button is clicked, update the corresponding record
  • In the date field you want to set as today use a dynamic variable with the TODAY field

kuovonne
Forum|alt.badge.img+27
  • Brainy
  • 6007 replies
  • September 23, 2022

There are ways to do this with a button that triggers an automation.

You can use formula fields to calculate today, yesterday, a week from now, etc.
Then have the automation copy the date from the formula field to the editable field.

If you use scripting, you can do it without the helper formula fields.
Sometimes I use an automation triggered by a single select and use the value of the single select to determine the specific action, instead of a button.


Calvin_Young2
Forum|alt.badge.img+12
  • Known Participant
  • 25 replies
  • April 4, 2025

You can apply a record template, but that only works if the date field is empty.  

 

It’s absurd that we have to use an automation for this.  Why can’t this be a dynamic entry? 


Reply