Schedule action based on today's Date

Hi everyone,

    I want to make an action that triggers when Today is less than a specific column.

In my table "Leaves", I have  a date column named "From" and another named "To" to plan leaves.I want when the date in From is not yet reached the value of date difference between To and From to be put under "Planned" column and after that and as soon as the date in From is reached the difference value should be put into consumed.First I made it in google sheet and it worked with this formula:

Planned:=IF(E11>$B$1, F11-E11+1, 0) and  in Consumed:=IF(E3<$B$1, F3-E3+1, IF(E3=$B$1, F3-E3+1, 0)).How to make it work in appsheet .

in google sheet:Column "B" is today's date, "E" is "From" (date) and "F" is "To"(date).

Thank you in advance,

0 4 302
4 REPLIES 4

In Planned:

  • IF([From]<TODAY(),[To]-[From],0)

In Consumed:

  • IF([From]>=TODAY(),[To]-[From],0)

Adjust as needed

Yes ,but how to schedule this calculation to trigger when today's date changed.I want the calculation first to be placed in Planned ,then as soon as the leave has began ,the calculation is placed in consumed column.This is the question.

   I am using a spreadsheet formula like that: 

For planned:IF(I:I>today(), J:J-I:I+1, 0)

For consumed:IF(I:I<today(), J:J-I:I+1, IF(I:I=today(), J:J-I:I+1, 0)).

But the question is do these formulas work when today's date is changed?

Best regards,

Sorry I am not sure what you mean when you say "schedule this calculation to trigger". If you are using virtual columns with the above two expressions, they will change based on the date due to the TODAY() function in the expression. 

Thank you for your reply.I think that It should work using spreadsheet formula directly from appsheet.

Top Labels in this Space