"Insert item" command does not respect repeating table filter - InfoPath Dev
in

InfoPath Dev

"Insert item" command does not respect repeating table filter

Last post 07-18-2013 12:43 PM by memeticdrool. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 07-18-2013 09:54 AM

    "Insert item" command does not respect repeating table filter

    I am working on a codeless solution in InfoPath 2010 (qRules is not an option) and I have a nested XML structure like the following:

    • root
      • services (group)
        • service (repeating group)
          • serviceId
          • serviceTitle
          • commitments (group)
            • commitment (repeating group)
              • commitmentTitle
      • ...
      • elements (group)
        • serviceId
      • ...etc.

     I am displaying the commitment nodes using a filtered repeating table. The user selects the serviceTitle (value: serviceId) from a drop down list box bound to root/elements/serviceId, and the repeating table bound to the root/services/service/commitments/commitment filters the commitments displayed to just the select service with the following filter:

    ../../my:serviceId = ../../../../my:elements/my:serviceId

    What I can't figure out is behavior that occurs when I select the 2nd service in the document (any service that is not the first) and start adding commitment records via the repeating table. If I insert records using the Insert Before and Insert After commands, the new commitment is created with the filtered service node. However, if I use the "Insert item" command at the bottom of the repeating table, InfoPath appends the new commitment element to the first service element. The new commitment displays on the filtered list, but then when I refresh the filter or switch services, the new record displays when the first service is selected.

    The "Insert item" hyperlink is very useful because it is the next control in the tab order. So a user doing data entry can add records without mouse clicks, whereas the Insert before and after commands require mouse clicks. I have done a couple days worth of experimenting and web research and can provide more details of the behavior, if needed. However, I'm at the point where I'm thinking perhaps this is a well understood behavior of InfoPath. So, I'm wondering if someone on this forum can explain the fundamental behavior of "Insert item" and why it makes sense that the new commitment node is appended to the wrong service node?

    Best, Simon

  • 07-18-2013 10:16 AM In reply to

    Re: "Insert item" command does not respect repeating table filter

    Fixed the formatting of original message.  Simon

  • 07-18-2013 10:34 AM In reply to

    Re: "Insert item" command does not respect repeating table filter

     Mind sharing your form? Under the Options tab... If I look at the template, I'll be able to understand your post a little better. :)

    Hilary Stoupa

  • 07-18-2013 11:27 AM In reply to

    Re: "Insert item" command does not respect repeating table filter

    Sure. I'm having a little difficulty connecting to my work computer at the moment and will have to scrub the form a bit. It is built with a secondary datasource connecting to a SharePoint list for the list of services that won't be accessible. So, I will build a quick and dirty simplified form that reproduces the problem and post that.
  • 07-18-2013 12:02 PM In reply to

    Re: "Insert item" command does not respect repeating table filter

    Attached is a mock-up of the form, Hilary.  Thanks for taking a look.

  • 07-18-2013 12:23 PM In reply to

    Re: "Insert item" command does not respect repeating table filter

     Thanks - a mockup made it easier. I don't use filters on repeating tables usually - I don't like having to hunt for them later - I use conditional formatting. What I did was put your commitments inside a control bound to services, added conditional formatting to that, and it appears to work correctly now. Save the attached file locally, right click and select design to preview.

    Hilary Stoupa

  • 07-18-2013 12:43 PM In reply to

    Re: "Insert item" command does not respect repeating table filter

    Thanks, Hilary!  That works great!  I appreciate the assist!

     Simon

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