Repeating Table Issues - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Repeating Table Issues

Last post 01-21-2022 08:11 AM by Hilary Stoupa. 11 replies.
Page 1 of 1 (12 items)
Sort Posts: Previous Next
  • 01-05-2022 12:11 PM

    Repeating Table Issues

    Hi, It's been awhile since I did this and I feel like I'm missing something super simple. I have a SharePoint list that I am tracking commitments for contracts. I felt the simplest way to to this is to create a list item for each category and Year, I'm trying to view the accumulated information in a repeating table on a second page. I've created a DC to pull this information and this is where I'm having problems. When I have the DC load the data when the form is opened the repeating table shows a line for each line in the list, but when I turn that off, my dropdown to select the contract number doesn't work. can someone tell me what I'm missing please? I'm sure it's super simple....
  • 01-06-2022 07:42 AM In reply to

    Maybe on the data view, hide the section the repeating table is in until the user selects a contract number? So if contract number is blank, hide the table. Then you can run the data connection on load. Keep in mind that if there is a lot of data, that can make the form slow, so if you need to you could always use two data connections - one with just contract numbers for the dropdown and another one with all the data that you query after the contract number is select. Hope that helps!
    Hilary Stoupa

  • 01-06-2022 08:14 AM In reply to

    Thanks Hilary, That's one of the hides that I was looking for, I also just realized that the filter I was using for the repeating table was not on the query field (LOL) You're a lifesaver!!
  • 01-11-2022 08:23 AM In reply to

    I’m having an issue with my dropdown, once I make a selection, I can’t make another selection until I select “blank”. I’ve run into this many times and am always able to figure it out, but this time it’s got me stymied. I even tried adding another DC to just pull the contract numbers, but that’s not working (probably a poor way of doing it too) Can you tell me what I’m doing wrong please? Thanks Daniel
  • 01-11-2022 08:32 AM In reply to

    So - what you are doing here confuses me. You have the IBPNonRepeat data connection bound to your dropdown. When it changes, you set a query field in that same data source to the selection, and requery. There is no need to do this, and as you have seen, it makes a mess of your dropdown, because once you run the query for that contract number, you have only the rows associated with that contract number in your data source. Since you are already returning all the rows for IBPNonRepeat on load, there is no reason to requery it. I would remove all the rules you currently have on your Contract Number dropdown, and just add a formatting rule to the repeating table bound to the IBPNonRepeat data connection to only display the rows that have the same contract number as that selected in the main DS. Please see attached. :)
    Hilary Stoupa

  • 01-11-2022 09:11 AM In reply to

    thank you so much! I know I was doing something wrong, I just couldn't put my finger on it. I have such issues with repeating tables, the rule that you used to hide the empty rows I ALWAYS forget, then I just try and fudge my way to the end. thanks again!
  • 01-11-2022 09:14 AM In reply to

    Ah - glad that sorted it :)
    Hilary Stoupa

  • 01-19-2022 12:29 PM In reply to

    I can't seem to get something else to work, I've got a new page with a similar repeating table on it, but am having issues getting it to display the way I want it. This table needs to be a sum of years per category. I am fairly certain I need to use preceding:sibling and/or the current() function to get it to hide unwanted rows. right now it will show the category for each year, I would like it to only show the categories once (rule preceding sibling on repeating table?) and then sum the YTD of all years per category. I feel like the category in the repeating table should be using current() and the repeating talbe should hide preceding sibling, but I can't seem to make it come together. am I way off base in the rules/formulas I need. or can this not even be done? Thanks
  • 01-19-2022 04:10 PM In reply to

    So - this is on the Totals view? You want each category to display only one time? That would be a preceding-sibling condition - hide if category = preceding-sibling category. d:Category = preceding-sibling::d:SharePointListItem_RW/d:Category is the expression I'd try. Then for your sum formula - probably something like this (for each of your quarters that you are adding together): sum(xdXDocument:GetDOM("IBP")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW[d:Category = current()/d:Category]/d:_x0051_1)
    Hilary Stoupa

  • 01-20-2022 09:26 AM In reply to

    That's what I thought, but it hides everything. which in turn causes the sum to not work properly (i think?). just to confirm, the preceding-sibling rule goes on the repeating table and the sum formula would be used 4 times, one for each quarter? what about category in the repeating table? I was just using d:category, but does that need a formula as well (current() perhaps?) I changed the DC for IBP to save the data (junk) into the form and reattached
  • 01-20-2022 03:53 PM In reply to

    I'll try to upload a copy w/ changes tomorrow. I do see on the repeating table formatting you are comparing title to category in the preceding-sibling condition - that would be why they are all hiding.
    Hilary Stoupa

  • 01-21-2022 08:11 AM In reply to

    Well, here's a copy with the rule change on the repeating table. I also changed both your formatting rules to just color the rows rather than hide them, so you can see what's happening a little better - you can change that back once the formatting is correct. I don't understand the difference between the two total columns - the last one looks like it is using the right filter on the sum formula.
    Hilary Stoupa

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