counting number of Repeating Sections entered

J

Jono

Is there a way to know how many of a particular Repeating Section a user has
inserted?
 
S

Si

You can just add a field to the datasource with a default value as a
formula e.g.

count(../my:group1/my:group2)

and then use this value

Si
 
J

Jono

Thanks Si,
I'm pretty new to this. Would you elaborate or is there documentation on this?
Specifically, I take it that "my:group1" is the name of the group, or
Repeating Section in my case, that I want to count. In my case it's just
"Group2" what would the formula look like for that "count(../group2)"? Also,
then where do I find the value this generates?
 
S

Si

The steps below will give you an example of this works you can then
implement on your own form:

1. Create a new blank form.
2. Drag a repeating section onto the page.
3. Drag a textbox onto the page outside the repeating section.
4. Either double click on the textbox or right click and select Textbox
Properties.
5. In the default value section of the properties page there is a
button marked fx next to an empty textbox, click this
6. An insert formula window should have appeared.
7. Click the Insert Function button.
8. Select All from the Categories list, then Count from the Functions
list and click Ok
9. Double click the text Double Click to Insert Field.
10. In the Select window expand the group1 node and select the
repeating node (probably Group2, marked with a blue box containing a
white down arrow) and click Ok
11. Click Ok (window closes)
12. Click Ok (window closes)
13. Click Preview Form from the top toolbar.
14. Click the Insert Item Link and the textbox will increment.

Phew, sounds like a really complex process but it isn't really once
you've done it.

Si.
 

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