Looking for help with calculated field on task form | Community
Skip to main content
New Participant
July 26, 2023
Solved

Looking for help with calculated field on task form

  • July 26, 2023
  • 1 reply
  • 722 views

I've been asked to set up a custom "Intake Form Due" field which will take a 1-5 value from another custom field “Complexity Level”, then add the date value of another custom field “Original ATV” and subtract that by # of weeks, etc.

 

For example, there is a field that will ask:

If complexity level = “1”, add the “Original ATV” date -2 weeks.

If complexity level = “2”, add the “Original ATV” date -4 weeks.

If complexity level = “3”, add the “Original ATV” date -8 weeks.

If complexity level = “4”, add the “Original ATV” date -10 weeks.

If complexity level = “5”, add the “Original ATV” date -12 weeks.

 

Looking for your guidance as I am new in text mode. I did this by creating a calculated custom field on a task custom form using these codes:

 

IF({DE:Complexity Level}=1,ADDDAYS({DE:Original ATV},-14),IF({DE:Complexity Level}=2,ADDDAYS({DE:Original ATV}-28,IF({DE:Complexity Level}=3,ADDDAYS({DE:Original ATV},-56),IF({DE:Complexity Level}=4,ADDDAYS({DE:Original ATV},-70),IF({DE:Complexity Level}=5,ADDDAYS({DE:Original ATV},-120)))))))

 

Can anyone help me out with the calculated field?

Thanking you in advance.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Heather_Kulbacki

@isadi  I do love a good IF statement!

I think you need a comma before the -28 and a right paren after the -28, and one less right paren at the end and if complexity level 5 is 12 weeks you want -84 instead of -120

 

If you maximize the custom field calculation area you can lay out your formula like this so it's a little bit easier to spot missing pieces.

IF({DE:Complexity Level}=1,ADDDAYS({DE:Original ATV},-14),
IF({DE:Complexity Level}=2,ADDDAYS({DE:Original ATV},-28),
IF({DE:Complexity Level}=3,ADDDAYS({DE:Original ATV},-56),
IF({DE:Complexity Level}=4,ADDDAYS({DE:Original ATV},-70),
IF({DE:Complexity Level}=5,ADDDAYS({DE:Original ATV},-84)
)))))

1 reply

Heather_Kulbacki
Heather_KulbackiAccepted solution
New Participant
July 27, 2023

@isadi  I do love a good IF statement!

I think you need a comma before the -28 and a right paren after the -28, and one less right paren at the end and if complexity level 5 is 12 weeks you want -84 instead of -120

 

If you maximize the custom field calculation area you can lay out your formula like this so it's a little bit easier to spot missing pieces.

IF({DE:Complexity Level}=1,ADDDAYS({DE:Original ATV},-14),
IF({DE:Complexity Level}=2,ADDDAYS({DE:Original ATV},-28),
IF({DE:Complexity Level}=3,ADDDAYS({DE:Original ATV},-56),
IF({DE:Complexity Level}=4,ADDDAYS({DE:Original ATV},-70),
IF({DE:Complexity Level}=5,ADDDAYS({DE:Original ATV},-84)
)))))
IsaDiAuthor
New Participant
July 28, 2023

Thank you Heather! Much appreciated.

Have a nice day!