Skip to main content

Automation to Set Priority level based on due date

  • October 20, 2020
  • 7 replies
  • 89 views

Karen_Siugzda
Forum|alt.badge.img+16

How do I set an automation so that every new job is automatically labeled as a RUSH if it’s due date is less than 5 days away?

I understand the logic would be:
If
First Pages Due date is less than 5 days from Date Created date, set Priority to RUSH.
Else
Set Priority to Normal

The 2 fields I’m comparing are date fields
First Pages Due and Date Created.

I have a Priority field with 2 options: RUSH and Normal.

Not sure how to actually implement it :stuck_out_tongue:

Thanks for your help!
Karen

7 replies

Kamille_Parks11
Forum|alt.badge.img+27

One option would be to have a formula field like this:

IF(DATETIME_DIFF({Due Date}, {Date Created}, 'days') > 5, "Normal", "Rush")

Then use an Automation with a “record matches conditions” or “Record is updated” trigger that ensures it only fires when both date fields are not empty. Add an “update record” action step that inserts the value of the formula field into the {Priority} field.


Karen_Siugzda
Forum|alt.badge.img+16
  • Author
  • Known Participant
  • October 21, 2020

One option would be to have a formula field like this:

IF(DATETIME_DIFF({Due Date}, {Date Created}, 'days') > 5, "Normal", "Rush")

Then use an Automation with a “record matches conditions” or “Record is updated” trigger that ensures it only fires when both date fields are not empty. Add an “update record” action step that inserts the value of the formula field into the {Priority} field.


Wow Kamille,
That looks pretty awesome! Thanks!!


Karen_Siugzda
Forum|alt.badge.img+16
  • Author
  • Known Participant
  • October 21, 2020

Your suggestion above definitely worked to create a field to auto generate Normal and Rush status.

However, we already have a single select field in use for Priority, with options of RUSH and Normal. Any way we can tap into that with an automation, rather than creating a new formula field?


Kamille_Parks11
Forum|alt.badge.img+27

Your suggestion above definitely worked to create a field to auto generate Normal and Rush status.

However, we already have a single select field in use for Priority, with options of RUSH and Normal. Any way we can tap into that with an automation, rather than creating a new formula field?


You could do this several ways, all of which include adding another field or writing a script. The reason being there isn’t an Automation filter which can let you say “the difference in these two specific but variable dates” which doesn’t rely on a field calculating the date difference.

You could have a formula field that just gives you the difference between those two dates and use two automations to set the single select status, or a single automation with a script step.


Karen_Siugzda
Forum|alt.badge.img+16
  • Author
  • Known Participant
  • October 21, 2020

ok. I think I follow what you’re saying. :slightly_smiling_face:

I would create a new field “Date Diff” to determine the difference between Date Job Created and First Pages Due.
I can set an automation to set the Priority to Normal when a new job is created.
Another automation could look at “Date Diff” and if the value is less than 5, set Priority to RUSH.

So, what formula would determine the difference between the 2 dates and spit that value into the “Date Diff” field?

I tried this and it spit out a number 7 digits long!
DATETIME_DIFF({First Pages Due}, {Date job created})

(sorry, newbie here)

Thanks!!


Kamille_Parks11
Forum|alt.badge.img+27

ok. I think I follow what you’re saying. :slightly_smiling_face:

I would create a new field “Date Diff” to determine the difference between Date Job Created and First Pages Due.
I can set an automation to set the Priority to Normal when a new job is created.
Another automation could look at “Date Diff” and if the value is less than 5, set Priority to RUSH.

So, what formula would determine the difference between the 2 dates and spit that value into the “Date Diff” field?

I tried this and it spit out a number 7 digits long!
DATETIME_DIFF({First Pages Due}, {Date job created})

(sorry, newbie here)

Thanks!!


The datetime diff formula you need is the same one inside the original formula in my first reply.


Karen_Siugzda
Forum|alt.badge.img+16
  • Author
  • Known Participant
  • October 21, 2020

The datetime diff formula you need is the same one inside the original formula in my first reply.


ah! ok. I left off the ‘days’ part. Got it!