Help

Re: Complex task overdue

3023 4
cancel
Showing results for 
Search instead for 
Did you mean: 
ana_velingard
5 - Automation Enthusiast
5 - Automation Enthusiast

Hi everyone
I have a habit/task table, the time period is on a multiple choice column (daily, weekly, bi-weekly monthly, etc.). I keep track of the last time it’s done (the date).
Is there a formula that can take both into consideration and tell me if something is overdue?
for example if it has been more then a week since i did a weekly task.

13 Replies 13
Julian_E_Post
8 - Airtable Astronomer
8 - Airtable Astronomer

A formula field with a switch statement should work well for this. I created an example base with this formula that calculates a “due date” for each case:

SWITCH( 
		Frequency, 

			'Daily',DATEADD({Last Completed},1,'day'),
			'Weekly',DATEADD({Last Completed},1,'week'),
			'Biweekly',DATEADD({Last Completed},2,'week'),
			'Annually',DATEADD({Last Completed},1,'year')
)

“Frequency” is the field where you will select the time period of the task. Each case adds the correct time period. Then you can create a second field that compares the “due date” against the current day:

IF(TODAY()>{Due Date},"Yes","No")

Tasks Example Base

Screen Shot 2020-10-03 at 11.15.51 PM

The due date thing doesn’t work

Try clicking on the example base that I linked to and look at how it’s set up. Does the column naming in your base match the column naming in the example?

It doesn’t, i changed the names accordingly but it doesn’t work, it says something is wrong but i don’t see what

Julian_E_Post
8 - Airtable Astronomer
8 - Airtable Astronomer

Can you upload a screenshot of the code?

photo6048761958498415751

It looks like the brackets with punctuation in front of each case may be your issue. What is the purpose of that? If you paste the code here, I’ll make a couple edits for you

SWITCH({time frame (from full contact list)},{.}‘daily’,DATEADD({Last Catch-up},1,‘day’),{.}‘twice a week’,DATEADD({Last Catch-up},3,‘day’),{.}‘weekly’,DATEADD({Last Catch-up},1,‘week’),{.}‘bi-weekly’,DATEADD({Last Catch-up},2,‘week’),{.}‘monthly’,DATEADD({Last Catch-up},1,‘month’),{.}‘6 months’,DATEADD({Last Catch-up},6,‘month’))

they don’t have a purpose it’s just what the computer gave me when i tried changing things.
thank you for your help.

Try this:

SWITCH(

	{time frame (from full contact list)},

		'daily', DATEADD({Last Catch-up},1,'day'),

		'twice a week',DATEADD({Last Catch-up},3,'day'),

		'weekly',DATEADD({Last Catch-up},1,'week'),

		'bi-weekly',DATEADD({Last Catch-up},2,'week'),

		'monthly',DATEADD({Last Catch-up},1,'month'),

		'6 months',DATEADD({Last Catch-up},6,'month')
)