Repeat Section automatic Numbering - InfoPath Dev
in

InfoPath Dev

Repeat Section automatic Numbering

Last post 04-03-2013 02:09 PM by Hilary Stoupa. 15 replies.
Page 1 of 2 (16 items) 1 2 Next >
Sort Posts: Previous Next
  • 04-03-2013 06:54 AM

    Repeat Section automatic Numbering

    I have repeating section and I need to number the items as (a), (b), (c).... How can I do that on the browser based form?

     

    Thanks

  • 04-03-2013 07:22 AM In reply to

    Re: Repeat Section automatic Numbering

     Fun question! I've attached a sample form - it only goes up to "e" - If you look under Data --> Resource files, you'll find an XML file called FormLogic where I have numbers w/ corresponding letters - I'm leveraging that in my expression box. Save the file locally, right click and select design to open, then preview from there. Oh - I used a repeating table, but it would work the same in a section - data structure is the same for either type of control.

    Hilary Stoupa

  • 04-03-2013 10:13 AM In reply to

    Re: Repeat Section automatic Numbering

    Thanks for the quick turn around. When I tried to implement the same logic on my form it does not work. For every row it keeps displaying "a". Instead of repeating table I am using repeating section. BTW, i am using infopath 2007.

  • 04-03-2013 10:20 AM In reply to

    Re: Repeat Section automatic Numbering

     And, as I said, that won't make a difference (repeating table vs. repeating section - they have the same data structure). I'm guessing you've not used the same logic I did in your formula - what's the formula you are using? Click Edit XPath to display the XPath.

    Hilary Stoupa

  • 04-03-2013 10:21 AM In reply to

    Re: Repeat Section automatic Numbering

     This is what I am using

    xdXDocument:GetDOM("FormLogic")/Numbering/Item/Value[xdXDocument:GetDOM("FormLogic")/Numbering/Item/Number = count(../preceding-sibling::*) + 1]

  • 04-03-2013 10:24 AM In reply to

    Re: Repeat Section automatic Numbering

     So - the issue is in your count of preceding-sibling.

     What's the XPath for your repeating group in the data source task pane? Right click the main data source group and select copy XPath.

     

    Hilary Stoupa

  • 04-03-2013 10:43 AM In reply to

    Re: Repeat Section automatic Numbering

    This is my repeating section

     /my:meetingAgenda/my:ReportGroup/my:ReportItemRepeatSection

  • 04-03-2013 10:51 AM In reply to

    Re: Repeat Section automatic Numbering

     So - based on the sample, I'd expect you to use something like:

    xdXDocument:GetDOM("FormLogic")/Numbering/Item/Value[xdXDocument:GetDOM("FormLogic")/Numbering/Item/Number = count(current()/preceding-sibling::my:ReportItemRepeatSection) + 1]

    If you are using an expression box in the repeating section to display the a, b, etc, like in the sample form. If you are using a default value in a field, that will have a different XPath - because current() will have a different meaning.

    Hilary Stoupa

  • 04-03-2013 11:10 AM In reply to

    Re: Repeat Section automatic Numbering

     I created the expression as per your suggestion and still the same. I am not using any default value for any of the fields.

  • 04-03-2013 11:14 AM In reply to

    Re: Repeat Section automatic Numbering

     Feel free to attach your form under the Options tab if you'd like me to take a look

    Hilary Stoupa

  • 04-03-2013 11:56 AM In reply to

    Re: Repeat Section automatic Numbering

    The main view has a repeating sections. The user enters values for report Item. For each and every report item the user enters I need to generate a, b, c.. on the preview section where I have the repeating section.
  • 04-03-2013 12:10 PM In reply to

    Re: Repeat Section automatic Numbering

     Okay - I added the expression box with the value in it - see if this works for you.

    Hilary Stoupa

  • 04-03-2013 12:50 PM In reply to

    Re: Repeat Section automatic Numbering

    It works. Thanks a lot. I am using browser based form. When I try to deploy it I am getting an error "Unsupported Control Binding".

  • 04-03-2013 01:49 PM In reply to

    Re: Repeat Section automatic Numbering

     Okay. Is there any more information in the error?

    Hilary Stoupa

  • 04-03-2013 01:55 PM In reply to

    Re: Repeat Section automatic Numbering

     When I check this is what I got

    "Binding a non-repeating control to a repeating field or group is not supported by infopath form services"

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