Jun 01, 2023 09:51 AM
Hello, I'm trying to create a Formula that will change Status according to the fields "Start Date" & "End Date".
If Today > End Date = "Delayed"
If Today < End Date = "In Progress"
If Today < Start Date = "Planning"
I have written the following formula that works for "Delayed", but shows "True" instead of "In Progress" or "Planning"
Solved! Go to Solution.
Jun 01, 2023 10:48 AM
Hey @lucas__mar!
Give this a shot:
IF(
{End Date},
IF(
TODAY() > {End Date},
"Delayed",
IF(
TODAY() < {End Date},
"In Progress",
IF(
TODAY() < {Start Date},
"Planning"
)
)
),
IF(
{Start Date},
IF(
TODAY() < {Start Date},
"Planning"
)
)
)
Jun 02, 2023 02:01 PM
Hey @lucas__mar!
Glad to see that the original formula worked as you'd hoped.
For the edit you're describing, give this a shot and let me know if it works or if something goes funky with it.
I haven't been able to test it yet, so I might have missed something:
IF(
{Completion},
SWITCH(
{Completion},
"Yes",
"Done",
"No",
IF(
{End Date},
IF(
TODAY() > {End Date},
"Delayed",
IF(
TODAY() < {End Date},
"In Progress",
IF(
TODAY() < {Start Date},
"Planning",
""
)
)
),
IF(
{Start Date},
IF(
TODAY() < {Start Date},
"Planning",
""
)
)
)
),
IF(
{End Date},
IF(
TODAY() > {End Date},
"Delayed",
IF(
TODAY() < {End Date},
"In Progress",
IF(
TODAY() < {Start Date},
"Planning"
)
)
),
IF(
{Start Date},
IF(
TODAY() < {Start Date},
"Planning"
)
)
)
)
Jun 01, 2023 10:48 AM
Hey @lucas__mar!
Give this a shot:
IF(
{End Date},
IF(
TODAY() > {End Date},
"Delayed",
IF(
TODAY() < {End Date},
"In Progress",
IF(
TODAY() < {Start Date},
"Planning"
)
)
),
IF(
{Start Date},
IF(
TODAY() < {Start Date},
"Planning"
)
)
)
Jun 01, 2023 12:08 PM
This worked like a charm @Ben_Young1
Thank you VERY VERY much 😃
Jun 02, 2023 01:34 AM
Hey @Ben_Young1 I'm trying to add a "Done" to that field, based on a value in an added single select field named "Completion" (Yes, No). The idea is that when the field is changed to "Yes", then the Status field changes to "Done". I tried with the IFs of your formula, but can't seem to get it right. Thxs for the help!
Jun 02, 2023 02:01 PM
Hey @lucas__mar!
Glad to see that the original formula worked as you'd hoped.
For the edit you're describing, give this a shot and let me know if it works or if something goes funky with it.
I haven't been able to test it yet, so I might have missed something:
IF(
{Completion},
SWITCH(
{Completion},
"Yes",
"Done",
"No",
IF(
{End Date},
IF(
TODAY() > {End Date},
"Delayed",
IF(
TODAY() < {End Date},
"In Progress",
IF(
TODAY() < {Start Date},
"Planning",
""
)
)
),
IF(
{Start Date},
IF(
TODAY() < {Start Date},
"Planning",
""
)
)
)
),
IF(
{End Date},
IF(
TODAY() > {End Date},
"Delayed",
IF(
TODAY() < {End Date},
"In Progress",
IF(
TODAY() < {Start Date},
"Planning"
)
)
),
IF(
{Start Date},
IF(
TODAY() < {Start Date},
"Planning"
)
)
)
)
Jun 03, 2023 10:42 AM
Thank you again @Ben_Young1 this is perfect! I think after spending a few minutes I now also understand the logic behind. It's a good time to import that Formulas Base that's around and study them in depth hehe
Thank you!!!!