Preceding-sibling Optional Section - InfoPath Dev
in

InfoPath Dev

Preceding-sibling Optional Section

Last post 07-03-2012 03:29 PM by Hilary Stoupa. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 07-03-2012 12:03 AM

    Preceding-sibling Optional Section

    I've got a form with the following layout:

     MyFields:

    • Textfield1
    • RepeatingSection
      • OptionalSection
        • Textfield2

    What I would like to do is create a sort of autonumbering of the OptionalSection into Textfield2. I've tried to insert the following formula into Textfield2: count(preceding-sibling::*/my:OptionalSection), but it doesn't work.

     Can somebody help me with this problem.

    Thanks

     

     

  • 07-03-2012 03:29 PM In reply to

    Re: Preceding-sibling Optional Section

    See attached - save the file locally, then right click the saved file and select Design to open in design mode.

    I used an expression box for this in my sample instead of a field - I'd think given the structure you describe, the XPath would be:

    count(../../preceding-sibling::my:RepeatingSection/my:OptionalSection) + 1

    Hilary Stoupa

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