Display all documents from a view

Jake Howlett, 31 July 2001

Category: Views; Keywords: view count

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:


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:


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.