Questionnaire - Displaying percentage of questions completed for a section - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Questionnaire - Displaying percentage of questions completed for a section

Last post 08-24-2009 06:57 AM by Sam Camblin. 8 replies.
Page 1 of 1 (9 items)
Sort Posts: Previous Next
  • 08-21-2009 05:29 AM

    Questionnaire - Displaying percentage of questions completed for a section

    Hi!

    I'm creating a questionnaire with sections, subsections, and questions.  The sections and subsections are repeating sections and the questions are a repeating table.  I want to display the percent of questions that have been answered in each section.  For instance, when someone selects a rating for a question its considered completed and the "percentage complete" for that section is updated.  Attached is my XSN file.  Please help!

  • 08-21-2009 08:20 AM In reply to

    Re: Questionnaire - Displaying percentage of questions completed for a section

    Hi Sam,

    I can think of one simple way of doing this, but it might not be what you want. Still, here it is.

    1. Separate your questionnaire into various views. Let's say you have 4 views, with (roughly) the same number of questions.

    2. You have buttons to "Go to the next view" when a user completes the fields in one view.

    3. Then it's simple: view 2 says 25% complete, view 3 says 50% complete, view 4 days 75% complete.

    I've heard of an Active X control to show a progress bar, but I've never implemented it and never seen it in action. I know it's linked from an old forum post.

    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


  • 08-21-2009 08:38 AM In reply to

    Re: Questionnaire - Displaying percentage of questions completed for a section

    Hey Sam,

    This is just a prototype, but this MAY be possible with qRules. See the attached form. There are rules on load and on each field, plus the percentage calculation. The problem with this is that

    a) all fields need to be required

    b) we need a field (hardcoded) with the total number of fields.

    I'll revisit this sample if it seems like something people might be interested in.

    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


  • 08-21-2009 08:49 AM In reply to

    Re: Questionnaire - Displaying percentage of questions completed for a section

    Here's a non qRules solution but it fails to account for invalid values. So if you have an integer field and someone enters a letter, this will still consider that "complete" and the percentage increases.

    Note: qRules will not work if your form already has code, and IPFS compatability is being tested as we speak (type).

    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


  • 08-21-2009 09:05 AM In reply to

    Re: Questionnaire - Displaying percentage of questions completed for a section

    Hi ErnestoM,

    Thanks for your quick response.  Your first idea is good, but won't work in this situation.  I couldn't download the XSN file you posted for your other ideas.  Can you email them to me instead? 

    I was thinking of something simple like on the attached "test" view, but I'm not sure how to sub-total it in repeating tables and repeating sections on the "View1".  Thoughts?

  • 08-21-2009 09:50 AM In reply to

    Re: Questionnaire - Displaying percentage of questions completed for a section

    Oh wow, repeating tables. Yeah, it's a bit more complicated in that scenario... I'll have to think about that.

    In the meantime, re-attaching my samples as zip. If you can't download it we'll communicate via email.

    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


  • 08-22-2009 07:25 AM In reply to

    Re: Questionnaire - Displaying percentage of questions completed for a section

     Not sure if you can download this either, but could you give the attached a try?  All the logic it uses is in the default value of SectionPercentageComplete.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 08-22-2009 08:19 AM In reply to

    Re: Questionnaire - Displaying percentage of questions completed for a section

    you can use code to loop over the repeating tables, section and based on the number of questions answered you can set a field to the %age completed field .

    Qazi Anis
    Technical Architect
    Bitwise Inc
  • 08-24-2009 06:57 AM In reply to

    Re: Questionnaire - Displaying percentage of questions completed for a section

    Hi Jimmy,

    Thanks for your quick response.  It works brilliantly in your example form.  Unfortunately when I try and reproduce it in another form it's displaying NaN in the preview.  Thoughts? 

    Attached is a screenshot with my data source.  I updated your logic for my data source as follows:

    count(descendant-or-self::node()/QuestionsRepeating[Rating != ""]) / count(//QuestionsRepeating) * 100

     

    Qazi Anis: Thanks for your response, but I'm using qRules and I'm trying to find a solution that doesn't use additional code.


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