Here's what I used on a quick and dirty project for a non-profit that 
needed web access to  contact list for fund raising on an interim basis.  
After selecting some of all the contacts, when they go to the record 
detail page (down a level from the record list), I display links to 
first/previous/next/last.  This let's user go navigate record by record 
through the detail, and then have the record id current for updates.

First, at the top of the recordList HTML:

<@ASSIGN NAME="myrecordlist" SCOPE=USER VALUE=<@VAR NAME=resultset[*,2]>>

Note that column 2 contained the unique contact ID (key).


Then within the recordDetail HTML:

<@ASSIGN NAME="first" VALUE=<@VAR SCOPE=USER NAME=myrecordlist[1,1]>>
<@ASSIGN NAME="last" VALUE=<@VAR SCOPE=USER NAME=myrecordlist[<@NUMROWS 
ARRAY=myrecordlist SCOPE=USER>,1]>>
        <a href="<@APPFILE>?_function=<@ARG _function>&Layout_0_uid1=<@VAR 
NAME=first>">First</a><br>
        <@IF EXPR="<@NUMROWS ARRAY=myrecordlist SCOPE=USER> > 2">
                <@ASSIGN NAME=current VALUE=<@ARG Layout_0_uid1>>
                                <@IF EXPR="(<@VAR NAME=first>) = (<@VAR 
NAME=current>)">
                                        <@ASSIGN NAME=previous VALUE=<@VAR NAME=first>>
                                        <@ASSIGN NAME=next VALUE=<@VAR SCOPE=USER 
NAME=myrecordlist[2,1]>>
                                <@ELSEIF EXPR="(<@VAR NAME=last>) = (<@VAR 
NAME=current>)">
                                        <@ASSIGN NAME=next VALUE=<@VAR NAME=last>>
                                        <@ASSIGN NAME=previous VALUE=<@VAR SCOPE=USER 
NAME=myrecordlist[<@CALC EXPR="<@NUMROWS ARRAY=myrecordlist 
SCOPE=USER>-1">,1]>>
                                <@ELSE>
                                        <@FOR STOP="<@NUMROWS ARRAY=myrecordlist 
SCOPE=USER>">
                                                <@ASSIGN NAME=next VALUE=<@VAR 
SCOPE=USER NAME=myrecordlist[<@CALC 
EXPR="<@CURROW>+1">,1]>>
                                                <@ASSIGN NAME=previous VALUE=<@VAR 
SCOPE=USER 
NAME=myrecordlist[<@CALC EXPR="<@CURROW>-1">,1]>>
                                                <@IF EXPR="(<@VAR NAME=current>) = 
(<@VAR SCOPE=USER 
NAME=myrecordlist[<@CALC EXPR="<@CURROW>">,1]>)"><@BREAK></@IF>
                                        </@FOR>
                                </@IF>
                <a href="<@APPFILE>?_function=<@ARG _function>&Layout_0_uid1=<@VAR 
NAME=previous>">Previous</a><br>
                <a href="<@APPFILE>?_function=<@ARG _function>&Layout_0_uid1=<@VAR 
NAME=next>">Next</a><br>
        <@ELSE>
        </@IF>
        <a href="<@APPFILE>?_function=<@ARG _function>&Layout_0_uid1=<@VAR 
NAME=last>">Last</a>

Note that HTML argument Layout_0_uid1 (which shows it to be filemaker 
related) is passed back to the current application file to generate the 
next desired record in the record list. 
>
>
>I'd like to provide a Google-style page "readout" on multi-page results to 
>searches, in the traditional style:
>
>       Previous 1 2 3 4 5 6 Next
>
>The Tango Search Builder creates some (hugely complex) code for successive 
>page links, and uses Forms with Submit buttons and hidden fields to pass 
>arguments
>
>Has anyone built or used a suitable replacement for this that uses a 
>Google-like style? Or can they recommend anything to acquire code from?
>
>
>We're using Tango 3.6x, Mac OS 9.2x, Webstar 4.x
>________________________________________________________________________
>TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED]
>                with unsubscribe witango-talk in the message body
>


Bill Conlon

To the Point
345 California Avenue Suite 2
Palo Alto, CA 94306

office: 650.327.2175
fax:    650.329.8335
mobile: 650.906.9929
e-mail: mailto:[EMAIL PROTECTED]
web:    http://www.tothept.com


________________________________________________________________________
TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED]
                with unsubscribe witango-talk in the message body

Reply via email to