InfoPath repeating table showing ALL rows from data connection, how to only show populated - InfoPath Dev
in

InfoPath Dev

InfoPath repeating table showing ALL rows from data connection, how to only show populated

Last post 12-29-2013 07:36 PM by donstephen. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 12-29-2013 01:59 PM

    InfoPath repeating table showing ALL rows from data connection, how to only show populated

     I have an InfoPath form connected to a sharepoint form library and have a need to create a report view pulling only the survey results from optional comment boxes and filtered by department which is controlled by a drop down.

    So, if HR selects "Technology Department" and only 3 surveys out of 20 completed are from Technology Department, it needs to pull only those surveys that have the comment sections present.  Right now... with my data set to query on department drop down and repeating table with fields pulled from my secondary data connection with necessary filters it pulls the accurate data no problem; however if all departments combined add up to 20, then 20 blank fields show up as soon as I select a department and the data falls into placed where it would be in order say by ID.  So row 1, 2 & 3 will be blank and 4 will be populated because ID 4 is a Technology Department item. 

    How do I get the rows not present per department to NOT show up or at least to create a display so that they all fall one after the other and blank spaces are removed in-between?

    Help please :(

     

  • 12-29-2013 04:21 PM In reply to

    Re: InfoPath repeating table showing ALL rows from data connection, how to only show populated

    Hi Pam,

    If you are only trying to hide a row if a certain field is blank, you may use a formatting rule which hides a row if a certain condition has been met. To proceed with this, click on the repeating table group (in your case the repeating group of the secondary data connection), add a Formatting rule, set a condition (ex. Category is blank), and then check Hide this control. In InfoPath 2010, your rule should look similar to this:

     

     Hope this helps.

    Don Stephen Lambatin / Support Engineer
    Qdabra Software
  • 12-29-2013 04:33 PM In reply to

    Re: InfoPath repeating table showing ALL rows from data connection, how to only show populated

     I have these rules set already and the lines are still present, I've adjusted them every which way I can think of but to no avail.  The data being filtered is 100% accurate, but the rows still appear. It's maddening!

  • 12-29-2013 04:41 PM In reply to

    Re: InfoPath repeating table showing ALL rows from data connection, how to only show populated

    I see. If you don't mind, would you be able to attach a sample or a copy of your form so we could investigate further?
    Don Stephen Lambatin / Support Engineer
    Qdabra Software
  • 12-29-2013 04:50 PM In reply to

    Re: InfoPath repeating table showing ALL rows from data connection, how to only show populated

     forgive the mess, the form is attached with the view I am having issues with.  Thx!

  • 12-29-2013 06:18 PM In reply to

    Re: InfoPath repeating table showing ALL rows from data connection, how to only show populated

    Thank you for attaching your sample. Upon checking, I noticed that you were using a filter condition on the fields instead of filtering the data connection itself, please test the modified form I am attaching and check the added rule on the drop-down list control, see if this approach works for you. Also, I noticed that you were using the CCCCommentID field as basis for hiding the repeating section. I am not sure if those fields are blank when you query the data connection, if those fields aren displaying data, then it will not trigger the rule to hide the rows.

    Don Stephen Lambatin / Support Engineer
    Qdabra Software
  • 12-29-2013 07:00 PM In reply to

    Re: InfoPath repeating table showing ALL rows from data connection, how to only show populated

    IT WORKED!!  

     

    The CCCCommentID filter everywhere I could trying to get those rows to disappear.  The data is filtered from sharepoint correctly all the non CCC items are filtered out... the rows that were showing are for the correct number of CCC items as a whole, just not the slimming down per department.   

    Your department filter works perfect on the upper section.  Now I just need to get it to work on all my sections.  I see what you did with the department drop down however I do not get the logic of setting the field and clearing the field but HEY IT WORKS!

     Can you tell me where you applied the filter to the data connection itself as I seem to be missing seeing exactly where the changes were made so I can apply it to my other sections?

    THANK YOU THANK YOU THANK YOU!!!

     

     

  • 12-29-2013 07:36 PM In reply to

    Re: InfoPath repeating table showing ALL rows from data connection, how to only show populated

    At the secondary data source (Comments Data), you will see two groups (queryFields and dataFields). The dataFields returns the data, while queryFields acts as a filter and lets you choose which ever data you wish to pull. So before querying, you have to set the queryFields to a certain value. The image below shows that the Department for the queryFields is set to the value of whichever is chosen from the drop-down list control (DeptFilter).



    After setting that value, you may now proceed with querying your data.

    Clearing the field after querying is sort of a best practice, in case you would want to filter out a different field, the Department field will not hold the previous query value.

    Don Stephen Lambatin / Support Engineer
    Qdabra Software
Page 1 of 1 (8 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.