total fields using "is not blank"

J

Janie

I am using a repeating table. I would like to add a "total" field that
counts one of the fields in the repeating table when that field is NOT blank.
I added a field using the "count" condition, but it counts the field even
when it's blank. I tried writing a rule to only count the field if it is not
blank, but that's not working. Thanks for your help in advance.
 
S

S.Y.M. Wong-A-Ton

What exactly do you mean by "count" condition? And is it that you want to
calculate the sum of fields or actually count how many fields have been
filled in?

If you have field1 in your repeating table and want to count how many
field1-s are not blank, use a function similar to

count(../my:group1/my:group2/my:field1[text() != ""])

when the "Edit XPath (advanced)" checkbox is on, or

count(field1[text() != ""])

when the "Edit XPath (advanced)" checkbox is off on the "Insert Formula"
dialog box.
 
J

Janie

Thank you for putting up with newbies like me. Here is what I entered:

count(../../my:group3/my:group4/my:MeetingsClient[text() ! = " "])

Expected value type: ]

Actual value: !
count(../../my:group3/my:group4/my:MeetingsClient[text() -->!<-- = " "])

But I get an error saying "A number is expected"

S.Y.M. Wong-A-Ton said:
What exactly do you mean by "count" condition? And is it that you want to
calculate the sum of fields or actually count how many fields have been
filled in?

If you have field1 in your repeating table and want to count how many
field1-s are not blank, use a function similar to

count(../my:group1/my:group2/my:field1[text() != ""])

when the "Edit XPath (advanced)" checkbox is on, or

count(field1[text() != ""])

when the "Edit XPath (advanced)" checkbox is off on the "Insert Formula"
dialog box.
---
S.Y.M. Wong-A-Ton


Janie said:
I am using a repeating table. I would like to add a "total" field that
counts one of the fields in the repeating table when that field is NOT blank.
I added a field using the "count" condition, but it counts the field even
when it's blank. I tried writing a rule to only count the field if it is not
blank, but that's not working. Thanks for your help in advance.
 
S

S.Y.M. Wong-A-Ton

Remove the space between ! and = (it should be != and not ! =).
Remove the space between the quotes.
---
S.Y.M. Wong-A-Ton


Janie said:
Thank you for putting up with newbies like me. Here is what I entered:

count(../../my:group3/my:group4/my:MeetingsClient[text() ! = " "])

Expected value type: ]

Actual value: !
count(../../my:group3/my:group4/my:MeetingsClient[text() -->!<-- = " "])

But I get an error saying "A number is expected"

S.Y.M. Wong-A-Ton said:
What exactly do you mean by "count" condition? And is it that you want to
calculate the sum of fields or actually count how many fields have been
filled in?

If you have field1 in your repeating table and want to count how many
field1-s are not blank, use a function similar to

count(../my:group1/my:group2/my:field1[text() != ""])

when the "Edit XPath (advanced)" checkbox is on, or

count(field1[text() != ""])

when the "Edit XPath (advanced)" checkbox is off on the "Insert Formula"
dialog box.
---
S.Y.M. Wong-A-Ton


Janie said:
I am using a repeating table. I would like to add a "total" field that
counts one of the fields in the repeating table when that field is NOT blank.
I added a field using the "count" condition, but it counts the field even
when it's blank. I tried writing a rule to only count the field if it is not
blank, but that's not working. Thanks for your help in advance.
 
J

Janie

Worked!!!! Thank you!

S.Y.M. Wong-A-Ton said:
Remove the space between ! and = (it should be != and not ! =).
Remove the space between the quotes.
---
S.Y.M. Wong-A-Ton


Janie said:
Thank you for putting up with newbies like me. Here is what I entered:

count(../../my:group3/my:group4/my:MeetingsClient[text() ! = " "])

Expected value type: ]

Actual value: !
count(../../my:group3/my:group4/my:MeetingsClient[text() -->!<-- = " "])

But I get an error saying "A number is expected"

S.Y.M. Wong-A-Ton said:
What exactly do you mean by "count" condition? And is it that you want to
calculate the sum of fields or actually count how many fields have been
filled in?

If you have field1 in your repeating table and want to count how many
field1-s are not blank, use a function similar to

count(../my:group1/my:group2/my:field1[text() != ""])

when the "Edit XPath (advanced)" checkbox is on, or

count(field1[text() != ""])

when the "Edit XPath (advanced)" checkbox is off on the "Insert Formula"
dialog box.
---
S.Y.M. Wong-A-Ton


:

I am using a repeating table. I would like to add a "total" field that
counts one of the fields in the repeating table when that field is NOT blank.
I added a field using the "count" condition, but it counts the field even
when it's blank. I tried writing a rule to only count the field if it is not
blank, but that's not working. Thanks for your help in advance.
 
S

S.Y.M. Wong-A-Ton

You're welcome!
---
S.Y.M. Wong-A-Ton


Janie said:
Worked!!!! Thank you!

S.Y.M. Wong-A-Ton said:
Remove the space between ! and = (it should be != and not ! =).
Remove the space between the quotes.
---
S.Y.M. Wong-A-Ton


Janie said:
Thank you for putting up with newbies like me. Here is what I entered:

count(../../my:group3/my:group4/my:MeetingsClient[text() ! = " "])

Expected value type: ]

Actual value: !
count(../../my:group3/my:group4/my:MeetingsClient[text() -->!<-- = " "])

But I get an error saying "A number is expected"

:

What exactly do you mean by "count" condition? And is it that you want to
calculate the sum of fields or actually count how many fields have been
filled in?

If you have field1 in your repeating table and want to count how many
field1-s are not blank, use a function similar to

count(../my:group1/my:group2/my:field1[text() != ""])

when the "Edit XPath (advanced)" checkbox is on, or

count(field1[text() != ""])

when the "Edit XPath (advanced)" checkbox is off on the "Insert Formula"
dialog box.
---
S.Y.M. Wong-A-Ton


:

I am using a repeating table. I would like to add a "total" field that
counts one of the fields in the repeating table when that field is NOT blank.
I added a field using the "count" condition, but it counts the field even
when it's blank. I tried writing a rule to only count the field if it is not
blank, but that's not working. Thanks for your help in advance.
 
D

dmonty

I have a similar situation where I want to count the number of times where
(field1 is blank and field2 is not blank) in a repeating section. Any
suggestions on how to do this?

Denise
S.Y.M. Wong-A-Ton said:
What exactly do you mean by "count" condition? And is it that you want to
calculate the sum of fields or actually count how many fields have been
filled in?

If you have field1 in your repeating table and want to count how many
field1-s are not blank, use a function similar to

count(../my:group1/my:group2/my:field1[text() != ""])

when the "Edit XPath (advanced)" checkbox is on, or

count(field1[text() != ""])

when the "Edit XPath (advanced)" checkbox is off on the "Insert Formula"
dialog box.
---
S.Y.M. Wong-A-Ton


Janie said:
I am using a repeating table. I would like to add a "total" field that
counts one of the fields in the repeating table when that field is NOT blank.
I added a field using the "count" condition, but it counts the field even
when it's blank. I tried writing a rule to only count the field if it is not
blank, but that's not working. Thanks for your help in advance.
 

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