Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / March 2006

Tip: Looking for answers? Try searching our database.

total fields using "is not blank"

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Janie - 01 Mar 2006 15:05 GMT
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.Y.M. Wong-A-Ton - 02 Mar 2006 12:43 GMT
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.
Janie - 02 Mar 2006 15:27 GMT
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
[quoted text clipped - 19 lines]
> > 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.Y.M. Wong-A-Ton - 02 Mar 2006 15:28 GMT
Remove the space between ! and = (it should be != and not ! =).
Remove the space between the quotes.
---
S.Y.M. Wong-A-Ton

> Thank you for putting up with newbies like me.  Here is what I entered:
>
[quoted text clipped - 30 lines]
> > > 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.
Janie - 02 Mar 2006 15:29 GMT
Worked!!!!  Thank you!

> Remove the space between ! and = (it should be != and not ! =).
> Remove the space between the quotes.
[quoted text clipped - 35 lines]
> > > > 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.Y.M. Wong-A-Ton - 02 Mar 2006 21:03 GMT
You're welcome!
---
S.Y.M. Wong-A-Ton

> Worked!!!!  Thank you!
>
[quoted text clipped - 37 lines]
> > > > > 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.
dmonty - 31 Mar 2006 18:30 GMT
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

> 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
[quoted text clipped - 19 lines]
> > 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.

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.