Filter Repeating Table with mutiple Checkboxes - InfoPath Dev
in

InfoPath Dev

Filter Repeating Table with mutiple Checkboxes

Last post 08-30-2012 08:52 AM by Hilary Stoupa. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 08-30-2012 08:20 AM

    • JakeE
    • Not Ranked
    • Joined on 08-30-2012
    • Posts 17

    Filter Repeating Table with mutiple Checkboxes

    I have a repeating table that I've copied to my main data source from a SharePoint list using qRules. This works great, but I need to filter the table results based on checkboxes the user might select.

    Initially I had 4 boolean columns in the table to match the checkbox options. I've gone back and forth between conditional formatting and filtering and it seems that filtering the table seems better but I was never able to get the correct results.

     My next course of action which I'm currently exploring is having another column in the table which is a concatenated string that contains the names of the boolean columns that were true. I then used the follwing filter expression:

     

    ../../my:Select_Project_Type/my:Project_Type_New_Site = string(true()) and contains(my:task_types, "NS")

     

    This works perfectly for one checkbox, I created three more filters like that (one for each of the remaining checkboxes). Now none of my results are populating.

     

    Has anyone used multiple checkboxes to filter a repeating table before or know what I might be doing wrong?

  • 08-30-2012 08:31 AM In reply to

    Re: Filter Repeating Table with mutiple Checkboxes

    Hi - so, I have gotten confused (again - that seems to be a theme for me!). Do you want to only copy some of the data from SharePoint to your main data source based on user selections? Because for your tablesrc parameter in your qRules CopyTable command, you could use a filtered XPath to just get the rows you want....you'd probably need to use a concat formula for your command.

    Hilary Stoupa

  • 08-30-2012 08:44 AM In reply to

    • JakeE
    • Not Ranked
    • Joined on 08-30-2012
    • Posts 17

    Re: Filter Repeating Table with mutiple Checkboxes

    I want to copy all the data from the list to the repeating table and then filter it in the form. I could have confused you by just metioning that. Copying the list data to the repeating table works just fine (love qRules)

    Using a filtered XPath is exactly the route I'm going now, but I'm not getting the correct results based on the checkbox selections.

    What would the concat formula look like? Would that just be an extended Xpath expression?

    Thanks for the fast reply!!!

  • 08-30-2012 08:49 AM In reply to

    • JakeE
    • Not Ranked
    • Joined on 08-30-2012
    • Posts 17

    Re: Filter Repeating Table with mutiple Checkboxes

    I feel like it just takes me asking someone for me to figure it out. I have the filters working exactly how I want them now! While waiting for your reply I used this expression and it seems to be working.

    (../../my:Select_Project_Type/my:Project_Type_New_Site = string(true()) and contains(my:task_types, "NS")) or (../../my:Select_Project_Type/my:Project_Type_Relocation = string(true()) and contains(my:task_types, "RL")) or (../../my:Select_Project_Type/my:Project_Type_Restack = string(true()) and contains(my:task_types, "Restack")) or (../../my:Select_Project_Type/my:Project_Type_Closing = string(true()) and contains(my:task_types, "Closing"))

    Thanks again for replying so quickly! 

     

  • 08-30-2012 08:52 AM In reply to

    Re: Filter Repeating Table with mutiple Checkboxes

    Hah - I always figure things out the very instant I hit "send" on the email to one of my very smart colleagues begging for assistance..... Admitting defeat always seems to free up my mind to find solutions. :-)

    Great job working it out!

    Hilary Stoupa

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