1

Hi guys I am making a SP 2013 site and am currently creating columns...

I have a drop down column (Circuit Type) , four text fields (Num1, Num2, Num3, Num 4) and a calculated column (Loss).

The Circuit Type dropdown has 5 different values. (ISDN, HDSL, HDSL2, HDSL4, Other).

The user choices a value and types a number in each text field and then the calculation appears....

but if user clicks on Circuit Type "ISDN" the calculation for "LOSS" will be Num1+Num2

but if the user clicks Circuit Type "HDSL" the calculation for "LOSS" will be different, same for the each of the different circuit type values..

How would I go about the certain calculation to happen depending on what Circuit Type the user chooses?

Im thinking of using designer workflow in SP Designer 2013, but not sure how to go about that.

Any help or suggestions will be much appreciated.. If you need more details I will reply back quickly.

Thank you.

0

You can do this by making LOSS column a Calcuated column. You can apply below formula

=IF([Circuit Type]="ISDN",[N1]+[N2],IF([Circuit Type]="HDSL",[N1]-[N2],0))

The syntax is IF(condition, truestatement, falsestatement)

In your case you can nest all the condition in multiple if's and use the falsestatement to specify else condition. Final formula will look like

=IF([Circuit Type]="ISDN",[N1]+[N2],IF([Circuit Type]="HDSL",[N1]-[N2],IF([Circuit Type]="HDSL2",[N1]*[N2],IF([Circuit Type]="HDSL3",[N1]/[N2],IF([Circuit Type]="HDSL4",[N1],0)))))

In the above N1 and N2 are field names. You should change it as required.

  • Do you have column with name 10? – Amal Hashim Nov 26 '14 at 14:39
  • No Amal, 10 is just a number, so if the user chooses ISDN, the calculation 10+10 will happen which outputs 20.. am I doing it wrong? – Matt Ludwig Nov 26 '14 at 19:59
  • Yes, in that case you should not use square brackets just use 10 + 10 Or you can directly place the result as 20 – Amal Hashim Nov 26 '14 at 20:00
  • Thank you, how many calculations can I put in one calculated column? Also if what if HDSL, HDSL2, HDSL4 have the same calculation and ISDN has a different one? – Matt Ludwig Nov 26 '14 at 20:38
  • for example, the calculation for HDSL, HDSL2, and HDSL4 is = ((len_26 + dlen_26) * 3.88) + ((len_24 + dlen_24) * 2.84) + ((len_22 + dlen_22) * 2.18) + ((len_19 + dlen_19) * 1.5) + ((f1_bt + f2_bt) * 3) + nogachf1 + nogachf2; – Matt Ludwig Nov 26 '14 at 20:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.