CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 alphabetical list

Print topic Send  topic

Author Message
william
Posted: 03/08/2002, 7:32 AM

I would like to display the records from a grid in an A-Z manner, with a menu at the top allowing access to each letter.

[All] A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

And then if the user selects a letter then it only displays records that begin with this letter... almost like an address book.... it is going to act as a directory type system

Any ideas?
Andrew B
Posted: 03/08/2002, 9:35 PM

The only hard thing about this is that there will be so many. The easy (but long) way to do this goes like this :

Create a menu form above the grid.

Add a menu item with the capiton 'A'.
Edit the properties for that field, and set the default value to 'letter=a'
-- repeat for each letter

In your grid form, go to 'input' and add a parameter. Change it's 'field' to the the DB field you want to search on.
Set the 'Variable Name' to 'letter' (the parameter you pass from the menu form)
type = param
data type = 'text'
operation = 'Like %'
and check [x] transfer

the 'operation' tells it to look for any field with that letter at the start, and anything else after it. This works for strings of arbitrary length, so you could use 'letter=abc' if you wanted to search for anything starting with 'abc'.

Gave this a shot and it works, but it will take a little whlie to make all 26 menu fields.

Hope this helps,
Andrew B


Andrew B
Posted: 03/08/2002, 9:50 PM

Forgot a few things...

To make 'all' work, just point back at the page w/o setting any default value.

Also, make sure that the 'letter' input param on the grid form does not have 'required' checked.

Don't know if I mentioned that you need to make the menu items URL type, and link them to the same page they are on.

The [x] transfer box will make sure that the input param (letter) is transferd when you click the next/previous page navigation buttons.

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.