Expand my Community achievements bar.

Join us LIVE in San Francisco on November 14th for Experience Makers The Skill Exchange. Don't miss out on this free learning event!
SOLVED

Looking for help with calculated field on task form

Avatar

Level 2

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.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@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)
)))))

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

@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)
)))))

Avatar

Level 2

Thank you Heather! Much appreciated.

Have a nice day!