Skip to main content
Question

Minimum Due Date Based on End of Quarter Date

  • June 18, 2020
  • 0 replies
  • 70 views

Hello!

I'm looking to create a date field formula that returns a due date that is 10 business days after a creation date field (this is auto populated based upon the recorded added date) or a static end date (the end of our fiscal quarter). I would also like this calculated date to be made static if the record has been already review by checking a checkbox. An example is below.

Scenario 1:
Quarter End Date: 7/31/20
Date Created: 6/18/20
Returned Due Date: 7/2/20 (+ 10 business days from Date Created)

Scenario 2: 
Quarter End Date: 7/31/20
Date Created: 7/23/20
Returned Due Date: 7/31/20 (<10 business days from Date Created but not further than quarter end date)

I know I'll need to use a min function but I'm unsure how to set up the formula. I'm guessing I'll have to add a calculated due date field that calculates the above and then populates the due date field with the due date if the checkbox is not checked off. Any help would be appreciated. Thanks!


------------------------------
Josh Baker
------------------------------
This topic has been closed for replies.

you could make two variables then use an if function at the end to determine whether to use it.

something like:
var date CalcDate = [Date Created] + Days(10);
//^Calculates your Returned Due Date

var date CheckDate = (If($CalcDate > [Quarter End Date], [Quarter End Date], $CalcDate));
//^Checks to make sure CalcDate is on or before quarter end date

If([Checkbox]=true,null,$CheckDate)
//^if your checkbox is checked then it doesn't return anything, but if it isn't checked, it returns your returned due date or visa versa if its supposed to be the other way around

------------------------------
Jordan McAlister
------------------------------