Finding values in a repeating table - InfoPath Dev
in

InfoPath Dev

Finding values in a repeating table

Last post 02-24-2016 08:20 AM by TOE_CHEESE. 8 replies.
Page 1 of 1 (9 items)
Sort Posts: Previous Next
  • 02-12-2016 10:24 AM

    Finding values in a repeating table

    I am new to this site so my apologies if I am not following protocol. As a last resort before I give up on this I thought I'd join and see if I can get it solved. Here is my situation. I have a form library where we collect monthly submissions from many offices through an IP form. On this "submission" IP form I have a drop-down for the month and a drop down for the year both of which contain manually entered values. I have an additional drop-down for the office selection that is populated from an offices SPlist. I am trying to create another "query" form that allows anyone to query the submissions SPlist based on month and year drop-down boxes selection. I was able to accomplish this by using a formula you had posted previously, thank you very much. Based on the month and year selection the results are captured in a repeating table and anyone can see in real-time what offices have submitted their forms. This is all good but what I need is to find out is what offices have not submitted rather than those who have. I need to find out what offices are missing or haven't yet submitted. I am going the route of trying to populate boolean text fields representing each office with "true" if the office name exists in the repeating table query results. My rules for each office will set the office field to ''true" based on the condition of the repeating table containing the office name. My problem is only the first value in the repeating table is being found which then sets the first office that had submitted in that month and year to true. I don't have to do it this way but it is where I am stuck. I am open to other ideas. I would like to do this without code if possible. My ultimate goal is for my user(s) to be able to see at a glance which offices have not submitted for the selected month and year. Thank you for any help, TOE_CHEESE
  • 02-12-2016 10:46 AM In reply to

    Re: Finding values in a repeating table

    In your rules, try changing the first dropdown to "any occurrence":
    Hilary Stoupa

  • 02-12-2016 12:19 PM In reply to

    Re: Finding values in a repeating table

    Thanks Hilary but that's not working. I've tried a couple different variations but the rules still don't after the first value.
  • 02-12-2016 12:45 PM In reply to

    Re: Finding values in a repeating table

    Here's a simple sample that uses secondary data connections that are XML files in the form. Save it locally, right click and select Design to view in design mode and then you can preview, etc.
    Hilary Stoupa

  • 02-16-2016 08:31 AM In reply to

    Re: Finding values in a repeating table

    Hi Hilary, Thank you for the sample. I was able to use the Boolean(....current()...) condition to find values in my repeating table. Definitely moving forward now. TOE_CHEESE
  • 02-19-2016 04:30 PM In reply to

    Re: Finding values in a repeating table

    I just wanted to do a follow-up on my earlier post. I worked on this for almost a month mostly because I'm a newb. I searched the forum for answers but couldn't find a way to loop thru a repeating table without code. Hilary provided me a sample which was a big help however I was still stuck. While her sample found and compared items from .xml files, the expression/condition/rule would only see the first item in the repeating table. In short, I wanted to pay it forward and post the two rules I found to work. contains(xdXDocument:GetDOM("SharePointLibrary")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:Title[(../d:Month = xdXDocument:get-DOM()/my:myFields/my:Month and ../d:Year = xdXDocument:get-DOM()/my:myFields/my:Year) and (. = current())], .) boolean(xdXDocument:GetDOM("SharePointLibrary")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:Title[../d:Month = xdXDocument:get-DOM()/my:myFields/my:Month and ../d:Year = xdXDocument:get-DOM()/my:myFields/my:Year and . = current()]) Hilary, once again, thank you for your help pushing me in the right direction. Sincerely, the TOE_CHEESE
  • 02-22-2016 02:18 PM In reply to

    Re: Finding values in a repeating table

    Hi, I could still use a little help with my project. While I can get my values from the repeating table, my customer wants to see them horizontally and with check boxes. I've taken the sample Hilary provided and modified it. I can get the values to display in another repeating table horizontally as text in calculated value boxes but I need to use check boxes to show when a value is true. I'm not sure how to go about that. I've attached a sample form. Thanks for the help.
  • 02-23-2016 07:38 AM In reply to

    Re: Finding values in a repeating table

    You are really close. Your checkbox for "PRT" is set to use yes / no. Your formula for PRT returns true / false. Copy out your formula for PRT, change the checkbox to true / false (which will probably remove the default formula for PRT) and then paste the formula back in as the default for PRT.
    Hilary Stoupa

  • 02-24-2016 08:20 AM In reply to

    Re: Finding values in a repeating table

    Hilary, thanks again. Just as you said and it's working now. On another note, I wanted my form to be published as a web browser form and I was getting errors from the design checker regarding binding non-repeating groups. I found your post about the problem being traced back to calculated values. I deleted and added back all of my calculated value fields and the errors were gone. Thanks for the help on that problem too! Have a great day!
Page 1 of 1 (9 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.