Automation to press button with time based formula

I have a button on a table that sends out an email to specified users.

I want the button to be pressed automatically if and only if the current date is within two weeks of a target date (two weeks away).

Anybody know how to do this?

Screen shot attached!

Hey @Scott_Weir

Here is an idea:

To calculate which day is in two weeks, you can do this:
Date(year(today()+14),month(today()+14),day(today()+14))
Now you can compare, if the IEP date is in two weeks and you can disable the “Email Feedback”-Button, if it is not:
11

Now set up an automation that pushes the Email Feedback Button daily. It should only push the active buttons.

25

1 Like

Hey @Daniel_Stieber,

Thank you for the help and for the idea! For some reason it is not working though. . . It is disabling all my buttons, even if I manually set the “IEP date” column to be exactly 14 days from now, that button is still disabled.

Any idea why?

:thinking: Can you make a screenshot of your „disabled if“ part?

Hey @Daniel_Stieber,

Thanks again for the help. It actually is working better now, but there is a bug with the time that is included in my “IEP date” column. If the time is set to anything other than 12:00am, it disables it even if the date is 14 days away as was specified in the “disable if” formula. Screen shot attached.

@Scott_Weir

ooh I see. There might be a smoother solution but a working hack:

Date(year(today()+14),month(today()+14),day(today()+14)) != Date(Date.Year(),Date.Month(),Date.Day())

That way you translate the datetime column in just a date and compare those two dates then.

1 Like

It worked for me! Thanks!

I have another question in a new thread I just started @Daniel_Stieber if you can be of any help in that one as well. Also has to do with disabling a button.

1 Like