infopath How do I set up autonumbering for repeating sections

L

Luvbooks

I am creating a form where I will have multiple areas of the form, and within
each area I will have repeating sections. How do I auto number the repeating
sections, so that when a new section is added that the new section will
automatically have a new seequential number.
 
S

Santhosh (GGK Tech)

Hi,

Use the following Xpath as a default value for one of the field in repeating
group.

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

Here Row is the repeating group.
 
D

Deb

Your Xpath:

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

doesn't work for me. I am not an advanced InfoPath developer, so if I ask
some stupid questions, please forgive me!

I've created a repeating table. The first column is my Row # and this is
the one that I want to autonumber by incrementing by one. When I do what
you've suggested, it won't verify. One thing I think I am missing here is
the "../" part. That is a location path? ... according to the error details.
Then I seem to have problems with the "::" following "preceding-sbiling".

Can you provide more information, please? Be as specific as you like ... I
won't be offended. :)

Thanks!
 
A

Anuma(GGK Tech)

HI,

If you are working on the Infopath Client then follow the below steps:
1. Add one expression box to repeating section.
2. Add "Position()" function in the expression box properties.

If you are working with Browser enabled form:
count(preceding-sibling::my:<RepeatingGroupNodeName>) + 1

I hope this will help you.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top