Expand my Community achievements bar.

Calculated field help needed

Avatar

Level 3

Dear All,

I want to to set up a calculated field in a custom form Im working on. I tired several different statements but Im far from syntax expert. I spent too many nights trying to solve these sort of puzzles on my own :) Can anyone help?

I have following custom fields:

A - dropdown with values: Yes / No

B - single line / number

C - single line / number

D - single line / number

E - single line / number

What I want to achieve is a calculated field to display a sum of B+C if A=yes or D+E if A=No.

Thanks in advance and have a great week ahead!

Kind regards,

Lukasz

5 Replies

Avatar

Community Advisor

can you show us what you have come up with that isn't working? I'll assume you've already checked out the help article on this (https://one.workfront.com/s/document-item?bundleId=the-new-workfront-experience&topicId=Content%2FReports_and_Dashboards%2FReports%2FCalc_Cstm_Data-Reports%2Fcalculated-data-expressions.html&_LANG=enus)

Avatar

Level 3

Hello Skye

Yes, I tried variations of what I was able to built in gsheet but I don't fully understand how to transpose it to WF syntax

=IF(A="Yes",SUM(B,C),IF(A="No",SUM(D,E)IF(A="","Not Required"))))

Avatar

Level 3

I think I finally managed to break this down :)

IF(A="Y",SUM(B,C),IF(A="N",SUM(D,E),IF(A="","Not Required")))

Avatar

Level 3

On top of it I found the calculation wasn't that much of an issue. One of the custom fields had - ? in its Name.

Avatar

Community Advisor

yes, in general it's considered good practice to leave special characters out of the field name. We customers fought hard for a separate field "label" to house all that junk, so you can leave the "?" in the label and take it off the name.