Count number in repeating sections

  • Thread starter Dennis Dürrenberger
  • Start date
D

Dennis Dürrenberger

I tried and I analysed example forms, but I did not get a clue, how to insert
a field into a repeating section, that counts the number of sections and
prints that out.

The form looks like this:

_____________
| text x |
| optional |
| | <---- the box
| dropdown |
------------------

text = title
optional = optional text field
dropdown = dropdown field
x = number (the one i have problems with)

if i insert another instance of the above box, i managed to handle the
dropdown seperately, so there is a "clean" dropdown in every new section.


the thing is: when i use count(box) for the x - then i either have a
functionally counter outside my box and it won´t be copied, OR i have the x
inside my box but when i add anoter instance of "box" the x changes it´s
value to "2" in all repeating sections, instead of numbering the sections
from 1 to ...

so at the moment either i have a correct value but only one item of it, that
will not be copied (repeated) or i have a copy in ever repeated section that
inherits a wrong value.

any clue how to manage that?
i found it in an example form, but ever then i couldn´t figuer out, how it
is managed there.

greets
dennis
 
M

Madhuri Nishanker Rao

Hi

Do the following way to count the repeating section

1. Drag and drop an Expression box in repeating section
2. Insert Expression box is displayed
3. Click on "fx" button
4. click on 'Insert Function' button in "Insert Formula" window
5. Select 'All' value from 'Categories' list box and 'Count()' from
‘Functions' list box
6. Double click to insert field in count formula and select the ‘Repeating
section’ from the datasource that needs to be counted
7. Click 'Ok'
8. Click 'Ok' and again click ‘Ok’
9. Save the form and preview the form
10. Add/delete a repeating sections
Now the now of repeating sections in the form is displayed in expression box
I hope this will help you.Thank You.
 
D

Dennis Dürrenberger

i´m afraid it´s not working
i already had that in mind, but with this method, i have just 1´s in my
repeating sections, instead of growing numbers.
 
M

Madhuri Nishanker Rao

Hi

Sorry, Put the Expression box out side the Repeating section, then it will
work fine.I tried it is working for me.
 
D

Dennis Dürrenberger

yes that is indeed working, i tried that.
but like i described, the counter in this case is outside the repeating
section, so it won´t be repeated at all.

it should look like:
text 1

text 2

text 3

while text 2 and 3 are repeated sections of text 1
so i do need to keep the counter (1,2,3) inside the repeating section

and there is my problem

the two alternatives wich (accidently) you offered me, were the two i tried
before, but did not satisfy my needs
 

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