Group:  Other Microsoft Office Products » microsoft.public.infopath
Thread: Count number in repeating sections

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

Count number in repeating sections
Dennis Dürrenberger 15.09.2006 07:28:01
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
RE: Count number in repeating sections
Madhuri Nishanker Rao 15.09.2006 08:28:02
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.

--
Madhuri Nishanker Rao

http://www.autonomysystems.com


"Dennis Dürrenberger" wrote:

[Quoted Text]
> 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
RE: Count number in repeating sections
Dennis Dürrenberger 15.09.2006 08:47:02
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.

"Madhuri Nishanker Rao" wrote:

[Quoted Text]
> 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.
>
> --
> Madhuri Nishanker Rao
>
> http://www.autonomysystems.com
>
>
> "Dennis Dürrenberger" wrote:
>
> > 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
RE: Count number in repeating sections
Madhuri Nishanker Rao 15.09.2006 09:10:02
Hi

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

http://www.autonomysystems.com


"Dennis Dürrenberger" wrote:

[Quoted Text]
> 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.
>
> "Madhuri Nishanker Rao" wrote:
>
> > 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.
> >
> > --
> > Madhuri Nishanker Rao
> >
> > http://www.autonomysystems.com
> >
> >
> > "Dennis Dürrenberger" wrote:
> >
> > > 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
RE: Count number in repeating sections
Dennis Dürrenberger 15.09.2006 09:21:02
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

"Madhuri Nishanker Rao" wrote:

[Quoted Text]
> Hi
>
> Sorry, Put the Expression box out side the Repeating section, then it will
> work fine.I tried it is working for me.
> --
> Madhuri Nishanker Rao
>
> http://www.autonomysystems.com
>
>
> "Dennis Dürrenberger" wrote:
>
> > 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.
> >
> > "Madhuri Nishanker Rao" wrote:
> >
> > > 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.
> > >
> > > --
> > > Madhuri Nishanker Rao
> > >
> > > http://www.autonomysystems.com
> > >
> > >
> > > "Dennis Dürrenberger" wrote:
> > >
> > > > 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

Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net