OMit n/a radio button when calculating score - InfoPath Dev
in

InfoPath Dev

OMit n/a radio button when calculating score

Last post 11-24-2010 02:00 AM by dangermouse. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 11-23-2010 01:04 AM

    OMit n/a radio button when calculating score

    Hello Everyone,

    I have created an infopath form with a set of radio buttons.

    The radio buttons allow the user to mark someones call handling skills

    There are six rows of radio buttons with values 1 - 5. However, each row also includes an n/a option.

    I would like to be able to write a formula to automatically calculate the score in percentage terms.

    This would be easy if not for the n/a option.e.g: field1 + field2 + field3 + field4 + field5 + field6 / 30 * 100

    How do I write a formula to extract the n/a option if one is chosen AND return the percentage score?

    Thanks for any assistance, Mike

  • 11-23-2010 08:34 AM In reply to

    Re: OMit n/a radio button when calculating score

    Hi, Mike:

    Add a filter when you select each field in the formula editor. Your filter would be something like "field1 is not equal to n/a". Your formula will then look like:

    field1[. != "n/a"] + field2[. != "n/a"] + field3[. != "n/a"] + field4[. != "n/a"] + field5[. != "n/a"] + field6[. != "n/a"] / 30 * 100

    Umm, by the way, future you (or whoever ends up owning and editing the form you are currently working on) will be really mad at present you if you don't rename all those fields so that they have meaningful names like AnswersPromptly, PoliteToCustomer, or whatever the the call handling skills are...

    Hilary Stoupa

  • 11-24-2010 01:53 AM In reply to

    Re: OMit n/a radio button when calculating score [.!="n/a"]

    Hi Hillary,

     Thanks for your amazingly quick response.

    Good Advice - Present me has fondly thought of future me and renamed all fields!!

    I plugged in the formula: Here it is:

    WelcomeResult [.!="n/a"] + ToneResult [.!="n/a"] + EmpathyResult [.!="n/a"] + LanguageResult [.!="n/a"]  + ControlResult [.!="n/a"] + WrapUpResult [.!="n/a"] / 30 * 100

    The option button values in each Result set are as follows - 1. 2. 3. 4. 5. n/a.

    However there's two problems -

    1. When previewing the form - if i click all "3" value option buttons, for example, the formula adds the first 5 sets together (= 15) and when the 6th "3" is chosen the result is 25 (The division by 30 and multiplication by 100 is only taking effect on the individual WrapUpResult?)

    Do I need to type e.g WelcomeResult [.!="n/a"] / 30 * 100 for each Result set? Or put the whole formula in brackets perhaps?

    2. If an n/a option is chosen no addition occurs and a 'Nan' error is returned.

    I'm currently looking on the nettyweb to find out what a Nan error is...

    Just to reitterate - If any "n/a" is chosen I would like the formula to add the other option button choices and bring a % score based on the remaining potential score - e.g if the choices are 3 + 3 + 3 + n/a + 3 + n/a then the potential score is out of 20 (each result set is out of 5) so the formula should calculate 12 / 20 * 100 = 60%

    I really hope this makes sense, Thanks for your help so far, if you have any ideas I'd really appreciate it.

     Mike

  • 11-24-2010 02:00 AM In reply to

    Re: OMit n/a radio button when calculating score [.!="n/a"]

    OK, I fixed number 1 already by putting open brackets at the start of the formula and at closed brackets before the / 30 * 100

    2. Nan error - is the only thing I need guidance on now I think...

    Mike

Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.