logo

Display all documents from a view


Thought I would write a quick one about something useful I just learnt, before I go and forget what it was. It is yet another one of those things that they neglect to inform us developers about in the documentation. Makes me wonder why they develop functionality if they aren't going to even tell us it is there. Reverse logic?

By now we should all be familiar with the View Design Element's Count parameter when it is viewed via the web. I've seen it used to all sorts of different ends. The most common uses seem to be to either limit the documents to a bare minimum or to go the other way and show a whole load of documents in one go. Personally I have seen a few cases where showing all the documents in a view at once was necessary. The problem is how do we go about doing this when we don't know how many documents there are?

A couple of little known facts:

Say we did know how many documents there were, and there were 4000, then we could specify this in the URL (?OpenView&Count=4000). The problem with this is that we are going to start using URLs with a count this high we need to reconfigure the server. The default maximum number of documents displayed for any view is 1000 rows per page. In order to remove the limit we need to change this value to 0 in the Domino Web Engine tab of the Internet Protocols tab, as shown below:

image

A value of zero in this field tells the server there is no maximum number of rows that can be returned. Now for most important part. If you specify a count of -1 in the URL this will return ALL the documents in that view. So with the above change made and the HTTP Task restarted the following URL would get all the "comments" in that database:

/path/to/db.nsf/comments?OpenView&Count=-1

Now we can always show the whole view no matter how many documents are stored in it.

Everything comes with a price:

Obviously not every administrator is going to accept a developer's request that they set the above value to zero. If you are lucky and they do then it is still advisable that you use this with restraint. Large views can increase the time they take to open immensely and thus can reduce the overall performance of the server.

The fact that this little feature is not well publicised may even mean that Iris plan to remove it from future releases of Domino. Saying that, I'm not even sure when it was introduced, so unless somebody tells me otherwise I'm going to assume it is an R5 feature.

Feedback

  1. Have you found that is maxes out?

    We were using the "-1" qualifier in a glossary database and as the client got to the "S" values they were entering for the glossary, the newest items stopped showing up in the View All view. The view was categorized and sorted by the first letter of the glossary item, so if we collapsed all the items, the missing "S" values would appear when only their category was expanded.

    So, the short of it was that it appeared that the -1 value maxes-out at about 2000 items in the browser. This was the only database we've ever had this number of entries...so I'm interested in seeing if others have had the same experience...

    • avatar
    • Joe
    • Fri 6 Dec 2002

    There was a problem with iNotes I think

    Hello,

    I think there is a problem with setting the server limit to 0. When you do that, iNotes mail interface stops working. Don't know why but I had the problem twice (onec with R5, once with R6RC).

    Strange...

  2. Equivalent in 6.5?

    Did this setting get removed in R6.5? Is it now covered under the Maximum Size of Request Content: field in the Internet Protocol tab and HTTP Protocol Limits section?

    Thanks, Gene

      • avatar
      • Jake Howlett
      • Fri 16 Apr 2004

      Re: Equivalent in 6.5?

      Don't know. Not got 6.5 to check it either. Sorry.

      Show the rest of this thread

Your Comments

Name:
E-mail:
(optional)
Website:
(optional)
Comment:



Navigate other articles in the category "Views"

« Previous Article Next Article »
Lock access to views   Processing multiple documents from a view

About This Article

Author: Jake Howlett
Category: Views
Keywords: view; count;

Options

Feedback
Print Friendly

Let's Get Social


About This Website

CodeStore is all about web development. Concentrating on Lotus Domino, ASP.NET, Flex, SharePoint and all things internet.

Your host is Jake Howlett who runs his own web development company called Rockall Design and is always on the lookout for new and interesting work to do.

You can find me on Twitter and on Linked In.

Read more about this site »