Averaging in InfoPath - InfoPath Dev
in

InfoPath Dev

Averaging in InfoPath

Last post 07-24-2008 05:22 AM by Anuma. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 07-23-2008 09:49 AM

    Averaging in InfoPath

    Hello I need your assistance with averaging in InfoPath 2003, I cannot get the averaging button to work correctly.  When I try to rate a question, the average button just repeats the last number that I rated (e.g. if I choose 1, 2, 3, 4, and 5, for questions 1 thru 5, my average will be 5, instead of averaging the rating to 3.0.) 

     

      Below are the rules and actions that I used. 

     

    Job Experience

    1 2 3 4 5 N/A
    Experience relevant to position
    Quality of work
    Career goals fit position
    Motivation and enthusiasm
    Problem solving skills
    Average rating 4
      Rule and Action for the helperField Action:  Set the field’s valueField:    AvgJobExperienceValue:   avg(experienceRating)  Rule and Action for the 1st part of the experience experienceRating Field Action:  Set the field’s valueField:    helperFieldValue:   “” Rule and Action for the 2nd part of the experienceRating Field  Action:   Set the field’s valueField:     helperFieldValue:    .

     

  • 07-23-2008 10:18 PM In reply to

    Average function only works with a repeating field.

    Typically you have to do it the old fashioned way. Add them all together and divide by the number of fields.

  • 07-23-2008 10:42 PM In reply to

    • Anuma
    • Top 25 Contributor
      Female
    • Joined on 07-20-2005
    • India
    • Posts 525
  • 07-23-2008 10:58 PM In reply to

    Hi,

    Can you please verify the below link.

    http://www.infopathdev.com/forums/p/1239/4407.aspx#4407

    Rajitha
  • 07-24-2008 05:07 AM In reply to

    Thank you very much, once I removed optional section and used just the repeating table the averaging worked like a charm. However, since my Exit Interview form will have over 20 questions and I want to collapse that section, so that everything will fit on to one page, how do I get the average to work with the optional section control to work along with the repeating table, so that section will collapsible? 

    Again thank you very much for your help.

  • 07-24-2008 05:22 AM In reply to

    • Anuma
    • Top 25 Contributor
      Female
    • Joined on 07-20-2005
    • India
    • Posts 525
    Hello, You have to add two buttons ( + , -) in header part of the template. Follow the below steps to show / hide the section. 1.      Move your questions table into one section. 2.      On ‘+’ button you have to set condition is ‘expand is equal to true’ hide and same as opposite for ‘–‘ button have the condition is ‘expand is not equal to true’ hide the control. (Expand is secondary variable to show / hide the button). 3.      On ‘+’ button you have to set the rule to set ‘expand’ to true and same as for ‘-‘ button have the rule is set ‘expand’ to false. 4.      You have to add one condition for section is: ‘expand is not equal to true’ hide the section.

    Note: Expand field default value is false.

    Anuma Chinthapalli /
    http://www.GGKTech.com
Page 1 of 1 (6 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.