APPLICATION DESIGN


Using Next and Previous buttons or hotspots with Start and Count parameters
If you are using Start and Count parameters you can include Next and Previous buttons or hotspots to enable users to navigate between pages of results. Both parameters must be used if you are using navigational buttons.

1. Open your customized results form and place buttons or hotspots labeled Next and Previous where you want them to appear on the form.

2. For the button or hotpsot labeled Next, write a formula that will advance the user forward one page.

3. For the button or hotspot labeled Previous, write a formula that will take the user back one page.

Example of a formula for a Next button or hotspot

@If(Hits >= Count; @URLOpen("/" + @Subset(@DbName; -1) + "/" + SearchView + "?SearchView&Query=" + @ReplaceSubstring(Query; " "; "+") + "&Start=" + @Text(Start+Hits) + "&Count=" + @Text(Count) + "&SearchOrder="+@Text(SearchOrder) +"&SearchWV="+@If(SearchVw = 0;"FALSE";"TRUE")+"&SearchThesaurus="+@If(SearchThesaurus = 0;"FALSE";"TRUE") + "&SearchMax=" + @Text(SearchMax)); "")

Example of a formula for a Previous button or hotspot

@If(Start > Count; @URLOpen("/" + @Subset(@DbName; -1) + "/" +SearchView + "?SearchView&Query=" + @ReplaceSubstring(Query; " "; "+") + "&Start=" + @Text(Start-Count) + "&Count=" + @Text(Count) + "&SearchOrder="+@Text(SearchOrder) +"&SearchWV="+@If(SearchVw = 0;"FALSE";"TRUE")+"&SearchThesaurus="+@If(SearchThesaurus = 0;"FALSE";"TRUE") + "&SearchMax=" + @Text(SearchMax)); "")

Tip To avoid syntax errors, use @ReplaceSubstring(Query; "" ' "+") to replace all of the spaces in your query with plus signs (+).

See Also