Count Question on Repeating Choice Group inside a Repeating Section with Controls - InfoPath Dev
in

InfoPath Dev

Count Question on Repeating Choice Group inside a Repeating Section with Controls

Last post 09-21-2015 02:44 PM by jack eagly. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 06-03-2015 12:27 PM

    Count Question on Repeating Choice Group inside a Repeating Section with Controls

    I'm trying to add a repeating choice group under a repeating section with controls to my form.  I need to add the number to the left of the choice as added.  I tried inserting a function that reads

    concat("(", count(..), ")") where .. is the repeating section with controls group.  The formula is accepted but when I run the form and add a choice both choices read 1.

    Any help is appreciated.

    Thanks!

  • 06-10-2015 09:50 AM In reply to

    Re: Count Question on Repeating Choice Group inside a Repeating Section with Controls

    Hi Jack,

    That is a common feature we implement in our forms. If you need to store the count I would use a formula as a default value, otherwise you can use a calculated value with a default. Here's an example formula:

    count(current()/../preceding-sibling::my:group2) + 1

    I have also attached a simple example form for reference.

    With the use of current() in your formula, just be careful that the function is not deleted I you change your data source. InfoPath has a tendency to take that part out of the formula if your data source changes so you'll sure need to add it back.

    Hope that helps!
    Bre

  • 09-21-2015 02:44 PM In reply to

    Re: Count Question on Repeating Choice Group inside a Repeating Section with Controls

    Thank you, this solution has saved me many times.  However, now I'm trying to use it in a repeating section that has 17 stacked repeating sections created from referencing the first one.  Now when I run the form my first count shows 18 rows do to the 17 other referenced repeating sections because it references SubParaSS1.

    count(current()/../preceding-sibling::my:SubParaSS1) + 1

    Please tell me I don't have to create 17 seperate repeating sections.

    Thanks!

    Jack

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