Our vBulletin migration is complete.
Welcome vBulletin users! All content and user information from the Micro Focus Forums (vBulletin) site has been migrated to this site. READ MORE.
Anonymous_User Absent Member.
Absent Member.
1270 views

count items/entries

Hi,

I've gone through the docs (once again ;-)), but couldn't find an answer:
Is there any possibility to get a 'count' of items before reading them via cursor or
getItems? - Would be helpful to inform the user of the progress.
Suppose we read als entries from ab biiiig SAB via cursor- we just know the fetched
items, no idea of how much to expect, so we can't show i.e. a progressBar.

cheers,
Markus



Labels (1)
0 Likes
2 Replies
Anonymous_User Absent Member.
Absent Member.

Re: count items/entries

For folders, you can use getFolderRequest and put
"count" and / or "unreadCount" in the view to get back
the count of items in the folder.

There is not a good way to get the count of address book
entries. You have to read the entries to get the count.
Since you have to read the entries to get the count, you
might as well do something useful with the data instead
of just throwing away the data once you have the count.
If you want to get the count anyway, you could try putting
in just "id" in the view. That will return just the id
(and usually a little more data). It is slightly faster
to return partial data from a record.

In 8.0.1, there will be a slightly faster way to get the
count. You can put "sid" only in the view. This will return
the record numbers of the items. In this case, an index is
read instead of the actual records. The use of the <sid>
element is very limited.

The <sid> element is not available on the System Address
Book (SAB) entries. If possible, we encourage developers
to cache the SAB. You can then use the getDeltaInfoRequest
and getDeltasRequest to keep the SAB cache up to date. If
you must get a count of SAB entries, you could use "id" in
the view.

Let me know if have more questions or you need it clarified.

Preston

>>> On Wednesday, April 01, 2009 at 11:08 AM, Markus

Colorado<colorado@aon.at>
wrote:
> Hi,
>
> I've gone through the docs (once again ;-)), but couldn't find an answer:
> Is there any possibility to get a 'count' of items before reading them via


> cursor or
> getItems? - Would be helpful to inform the user of the progress.
> Suppose we read als entries from ab biiiig SAB via cursor- we just know

the
> fetched
> items, no idea of how much to expect, so we can't show i.e. a

progressBar.
>
> cheers,
> Markus

0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: count items/entries

Thanks for clarification Preston.
Would just be a nice feature to inform the user on long term calls....


Markus




"Preston Stephenson" <PStephenson@gw.novell.com> schrieb im Newsbeitrag
news:49D35419.07F1.0037.1@gw.novell.com...
> For folders, you can use getFolderRequest and put
> "count" and / or "unreadCount" in the view to get back
> the count of items in the folder.
>
> There is not a good way to get the count of address book
> entries. You have to read the entries to get the count.
> Since you have to read the entries to get the count, you
> might as well do something useful with the data instead
> of just throwing away the data once you have the count.
> If you want to get the count anyway, you could try putting
> in just "id" in the view. That will return just the id
> (and usually a little more data). It is slightly faster
> to return partial data from a record.
>
> In 8.0.1, there will be a slightly faster way to get the
> count. You can put "sid" only in the view. This will return
> the record numbers of the items. In this case, an index is
> read instead of the actual records. The use of the <sid>
> element is very limited.
>
> The <sid> element is not available on the System Address
> Book (SAB) entries. If possible, we encourage developers
> to cache the SAB. You can then use the getDeltaInfoRequest
> and getDeltasRequest to keep the SAB cache up to date. If
> you must get a count of SAB entries, you could use "id" in
> the view.
>
> Let me know if have more questions or you need it clarified.
>
> Preston
>
>>>> On Wednesday, April 01, 2009 at 11:08 AM, Markus

> Colorado<colorado@aon.at>
> wrote:
>> Hi,
>>
>> I've gone through the docs (once again ;-)), but couldn't find an answer:
>> Is there any possibility to get a 'count' of items before reading them via

>
>> cursor or
>> getItems? - Would be helpful to inform the user of the progress.
>> Suppose we read als entries from ab biiiig SAB via cursor- we just know

> the
>> fetched
>> items, no idea of how much to expect, so we can't show i.e. a

> progressBar.
>>
>> cheers,
>> Markus



0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.