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 / December 2004

Tip: Looking for answers? Try searching our database.

Counted Records

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mike - 05 Dec 2004 22:49 GMT
Hi, Is there any way to show the correct count of records for a repeating
table with no records in it yet. example Number of Check shows as 1 instead
of 0 in the form as well as when submitted to the database even though no
data was entered for checks.

Thanks
Andrew Watt [MVP - InfoPath] - 06 Dec 2004 08:51 GMT
>Hi, Is there any way to show the correct count of records for a repeating
>table with no records in it yet. example Number of Check shows as 1 instead
>of 0 in the form as well as when submitted to the database even though no
>data was entered for checks.
>
>Thanks

Mike,

The count you are seeing is correct because InfoPath is counting the
number of rows/cells in the repeating table.

So you need a formula that counts cells that are not empty. So you
need an XPath predicate that only matches cells/rows with the
particular data empty.

Something like this should do it for a single cell bound to field3 in
the row being empty:
count(../my:group1/my:group2/my:field3[not(. = "")])

Andrew Watt
MVP - InfoPath
Andrew Watt [MVP - InfoPath] - 06 Dec 2004 09:21 GMT
>>Hi, Is there any way to show the correct count of records for a repeating
>>table with no records in it yet. example Number of Check shows as 1 instead
[quoted text clipped - 18 lines]
>Andrew Watt
>MVP - InfoPath

Should be NOT empty in the line before the XPath formula.

Andrew Watt
MVP - InfoPath
Mike - 06 Dec 2004 14:09 GMT
Thanks Andrew, it worked perfectly. I also found out that there is a filter
wizard when entering formulas.

Mike

> >Hi, Is there any way to show the correct count of records for a repeating
> >table with no records in it yet. example Number of Check shows as 1 instead
[quoted text clipped - 18 lines]
> Andrew Watt
> MVP - InfoPath
 
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.