Search result pages
(Created page with "Using the multivariable seeker to search the database you can configure the seeker to return the number of search result pages if the search does not fit within the MaxFetch s...")
 
No edit summary
Line 22: Line 22:


Currently this is only available in the WPF-client. TODO - Implement in Turnkey Views
Currently this is only available in the WPF-client. TODO - Implement in Turnkey Views
==== Same explained with other words ====
When paging is turned on (define the variables above to turn it on) we will first execute the query with "select count(*) ...." to get the total count of hits in the db - this value is assigned to variable vSeekerResultCount.
You can set a desired page length - or expose this to your end users in the variable vSeekerPageLength.
The total number of pages available after search is then vSeekerPageCount:=vSeekerResultCount/vSeekerPageLength
If there a X pages availabe you control what page is actually fetched from db by setting a value in vSeekerPage between 1 and X prior to search.

Revision as of 13:50, 18 May 2020

Using the multivariable seeker to search the database you can configure the seeker to return the number of search result pages if the search does not fit within the MaxFetch setting.

To set this up the seeker logic looks for a set of known variable names to communicate the results in:

/// If this variable is found in a seeker - it controls what the search shows , on what page it is - vSeekerResultCount/vSeekerPageLength

vSeekerPage

/// The number of pages is set by the search logic for you to use, add variable and use type integer

vSeekerPageCount

/// The number of items you want on a page

vSeekerPageLength

/// The count of the sql query is set by search logic - you must add a variable of this name of type longint

vSeekerResultCount

The Autoforms construct seeker that make use of paging - refer to an autoform generated seeker to see details.

Currently this is only available in the WPF-client. TODO - Implement in Turnkey Views

Same explained with other words

When paging is turned on (define the variables above to turn it on) we will first execute the query with "select count(*) ...." to get the total count of hits in the db - this value is assigned to variable vSeekerResultCount.

You can set a desired page length - or expose this to your end users in the variable vSeekerPageLength.

The total number of pages available after search is then vSeekerPageCount:=vSeekerResultCount/vSeekerPageLength

If there a X pages availabe you control what page is actually fetched from db by setting a value in vSeekerPage between 1 and X prior to search.

This page was edited 98 days ago on 02/10/2024. What links here