Preceding Siblings for a field in a section within a repeating section - InfoPath Dev
in

InfoPath Dev

Preceding Siblings for a field in a section within a repeating section

Last post 01-11-2016 07:48 AM by Hilary Stoupa. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 12-31-2015 09:48 AM

    Preceding Siblings for a field in a section within a repeating section

    I have a field named 'Expected_Results1_MonitoringSummary' that in a section named 'group9' that is within a repeating section 'group8'. When someone adds a section in the repeating section(group8) I would like the value 'Expected_Results1_MonitoringSummary' to default to the value of the 'Expected_Results1_MonitoringSummary' in the previous section. I do not want to take the field out of the repeating section because although the user will keep the previous value most of the time there are instances where they will modify it slightly and want to use that going forward. I hope this makes sense. I copied the Xpath for the 'Expected_Results1_MonitoringSummary' field: /my:myFields/my:group7/my:group8/my:group9/my:Expected_Results1_MonitoringSummary Thanks
    Filed under:
  • 01-08-2016 09:17 AM In reply to

    Re: Preceding Siblings for a field in a section within a repeating section

     Put a rule on group9 that sets Expected_Results1_MonitoringSummary to: preceding-sibling::my:group9[1]/my:Expected_Results1_MonitoringSummary

    When a new row is inserted, the value will be set to the value from the immediately preceding row. 

    Hilary Stoupa

  • 01-11-2016 04:48 AM In reply to

    Re: Preceding Siblings for a field in a section within a repeating section

     Thank you for the reply!   When I enter:

    preceding-sibling::my:group9[1]/my:Expected_Results1_MonitoringSummary

    I am getting the following error: 

    "preceding-sibling::my:group9/my:Expected_Results1_MonitoringSummary" does not point to a valid location path of a field or group. 

     any thoughts? 

  • 01-11-2016 06:24 AM In reply to

    Re: Preceding Siblings for a field in a section within a repeating section

     I figured it out

     I applied the following rule to the repeating section (group 8)

    preceding-sibling:: my:group8[1]/my:group9/my:Expected_Results1_MonitoringSummary

     

    Thank you so much for your help!! 

     

  • 01-11-2016 07:48 AM In reply to

    Re: Preceding Siblings for a field in a section within a repeating section

     Ah, good call - I guessed group9 was the repeat and guessed wrong. :) Glad you got it! Here's an old blog post from Greg Collins that has helped me understand preceding-sibling.

    Hilary Stoupa

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