Oh Lord of the CodeStore.... You may smite me down after this reply, but have you ever done/thought of this!!!
With regards to Domino and counting of documents in a View. Whenever i need to do this, i create a computed field called "Total" that extracts the "&total=" value from the Query String.
If the query string does not contain this value, then i perform an "@DbColumn" or "@DbLookup" to return the list of the documents in the View. From this i use the "@Elements" to extract my view total.
--- Total Field Value ---
t1 := @Middle(Query_String; "&total="; "&");
@If(t1 <> ""; @Return(t1); @Success);
t2 := @DbColumn(""; ""; "View"; 1);
@If(@IsError(t1); 0; @Elements(t1))
--- Total Field Value ---
Although this will fail for HUGE views, it works for most. Also, because the Total calculation is done once and then passed to the "Next" & "Prev" pages, it processes pretty quickly.
--- Next Link ---
View?OpenView&Start=21&Count=20&Total=100
--- Next Link ---
Using the Total field i can then calculate when to Show/Hide the "Previous" and "Next" links.
--- Hide Previous Link ---
Start = 0 | Start = ""
--- Hide Previous Link ---
--- Hide Next Link ---
Start + Count >= Total
--- Hide Next Link ---
The Exact coding above may not be 100%, but the logic is sound!
Hi Jake...
Oh Lord of the CodeStore.... You may smite me down after this reply, but have you ever done/thought of this!!!
With regards to Domino and counting of documents in a View. Whenever i need to do this, i create a computed field called "Total" that extracts the "&total=" value from the Query String.
If the query string does not contain this value, then i perform an "@DbColumn" or "@DbLookup" to return the list of the documents in the View. From this i use the "@Elements" to extract my view total.
--- Total Field Value ---
t1 := @Middle(Query_String; "&total="; "&");
@If(t1 <> ""; @Return(t1); @Success);
t2 := @DbColumn(""; ""; "View"; 1);
@If(@IsError(t1); 0; @Elements(t1))
--- Total Field Value ---
Although this will fail for HUGE views, it works for most. Also, because the Total calculation is done once and then passed to the "Next" & "Prev" pages, it processes pretty quickly.
--- Next Link ---
View?OpenView&Start=21&Count=20&Total=100
--- Next Link ---
Using the Total field i can then calculate when to Show/Hide the "Previous" and "Next" links.
--- Hide Previous Link ---
Start = 0 | Start = ""
--- Hide Previous Link ---
--- Hide Next Link ---
Start + Count >= Total
--- Hide Next Link ---
The Exact coding above may not be 100%, but the logic is sound!
Anyway, just thought i'd throw my oar in!
Later
Patrick