Trouble with pointing to an Optional Attribute field in a repeating table - InfoPath Dev
in

InfoPath Dev

Trouble with pointing to an Optional Attribute field in a repeating table

Last post 10-09-2014 01:35 PM by T. Storm. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 10-03-2014 12:04 PM

    Trouble with pointing to an Optional Attribute field in a repeating table

    I am relatively new to XPath and have run into a roadblock. The requirements are to copy the previous row in a repeating table when "Insert Row" is clicked. I have configured this with elements just fine with the following path:

    ../preceding-sibling::mygroup1[1]/my:field1

    Now, within the repeating table are a set of checkboxes. The previous developer, created these as attributes under a field element. My struggle right now is configuring the default values of the checkboxes with the logic above to point to these checkboxes to copy to the next row.

    Any thoughts on how/if this can be accomplished?

    -T. Storm

  • 10-03-2014 12:09 PM In reply to

    Re: Trouble with copying attribute in a repeating table

    Can you right click one of the attributes in the data source task pane and select Copy XPath so I can see the XPath of one? I can help you with a sample formula then. :)

    Hilary Stoupa

  • 10-03-2014 12:23 PM In reply to

    Re: Trouble with copying attribute in a repeating table

    Hilary Yes!

    /my:myFields/my:OptionalSections/my:Group/my:GroupRepeating/my:Field/@my:Attribute

    For privacy reasons, I replaced the display names with the type.

    -T.Storm

  • 10-03-2014 12:46 PM In reply to

    Re: Trouble with copying attribute in a repeating table

    So - something like this:

    ../preceding-sibling::my:GroupRepeating[1]/my:Field/@my:Attribute

    should do it - I just wasn't sure if your attributes were on the group or on a field in the group. :)

    Hilary Stoupa

  • 10-03-2014 01:26 PM In reply to

    Re: Trouble with copying attribute in a repeating table

    Oh no - it gave me the following error:


    "../preceding-sibling::my:GroupRepeating/my:Field/@my:Attribute" does not point to a valid location path of a field or group.

     Did I include all the info?

  • 10-03-2014 02:15 PM In reply to

    Re: Trouble with copying attribute in a repeating table

    Is the rule on the repeating group itself? If so - you won't need the "../"

    I'm attaching a sample. Save it locally, right click and select design to open in design mode. Preview, fill out the row and click the insert button. The next row should auto-populate with the previous row's values. The rule is on the repeating group.

    Hilary Stoupa

  • 10-09-2014 01:35 PM In reply to

    Re: Trouble with copying attribute in a repeating table

    Wonderful! This was exactly what I was looking for!

    I can't thank you enough for your candor and astute knowledge.

    Kudos, on kudos, on kudos.

    -T. Storm

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