Problem with second instance of Repeating Section. - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Problem with second instance of Repeating Section.

Last post 07-26-2011 01:24 PM by Lockdown. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 07-26-2011 12:12 PM

    Problem with second instance of Repeating Section.

    I have a repeating section that the user can add multiple instances of.

     In this section they select an option from a dropdown box.

     Depending what option they selected, descriptions are loading into expression boxes from a secondary xml data source.

     Everything works perfectly fine as long as there is one instance of the repeating section.

    As soon as I add a section section, the descriptions all go to one choice rather than being different in each of the repeating sections.

     I used some conditional xPath statements with the expression boxes to display the correct information.

    Example: xdXDocument:GetDOM("Flat File Specs")/FlatFileSpecs/CCR/Header/RecordID/Description[xdXDocument:get-DOM()/File/PmtRec/@PmtMethod = "CCR"] | xdXDocument:GetDOM("Flat File Specs")/FlatFileSpecs/CHK/Header/RecordID/Description[xdXDocument:get-DOM()/File/PmtRec/@PmtMethod = "CHK"]

     I just need to know why the repeating sections are not showing independant data.

  • 07-26-2011 12:24 PM In reply to

    Re: Problem with second instance of Repeating Section.

    Hi -

    I'm guessing you'll need to use "current()" in your XPath.If PmtRec is your repeating group, and your expression boxes are in a repeating section bound to that group:

    xdXDocument:GetDOM("Flat File Specs")/FlatFileSpecs/CCR/Header/RecordID/Description[current()/@PmtMethod = "CCR"] | xdXDocument:GetDOM("Flat File Specs")/FlatFileSpecs/CHK/Header/RecordID/Description[current()/@PmtMethod = "CHK"]

    Hilary Stoupa

  • 07-26-2011 12:42 PM In reply to

    Re: Problem with second instance of Repeating Section.

    Yuuup, that was it. Thank you so much, this site is amazing.

     Wish I wasn't so dumb and decided not to test out adding sections before configuring hundreds of these boxes.

     I have lots of copy/paste to do today!

  • 07-26-2011 12:49 PM In reply to

    Re: Problem with second instance of Repeating Section.

    Don't be hard on yourself - consider it a learning experience. But copy / paste is our friend. :-}

    Hilary Stoupa

  • 07-26-2011 12:59 PM In reply to

    Re: Problem with second instance of Repeating Section.

    Are those xPath equations stored in the manifest? If so this is a simple fix!

  • 07-26-2011 01:24 PM In reply to

    Re: Problem with second instance of Repeating Section.

    Ok I got most of it fixed but it created a new problem.

    I have sections of PmtMethod that only show depending on what the user selects. I added the current() function and now nothing is showing up in those fields. Could it be because there is a PmtMethod section nested inside the repeated section?

    Edit: Nevermind, I got it figured out. Thanks again Hilary!

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