Forums

This topic is locked

Searching values in Dynamic Table

Posted 07 Jul 2005 18:45:04
1
has voted
07 Jul 2005 18:45:04 nancy stefanik posted:
Hi I have an Employee Directory that is dispalyed via the "Dynamic Table" Application Object.
Everything works fine. I'd like to add a Search Funcitonality based on First_Name and have those results "show up" (take focus) either in the top rows of my dynamic table or highlighted some way or even in another area completely.

Please help, with this search functionality.

Thank you,
nancy

Replies

Replied 08 Jul 2005 21:57:34
08 Jul 2005 21:57:34 Simon Martin replied:
Hi Nancy,

I think what you want is to have a text box for the users to enter the First_Name and a submit button. Then build a page that generates a recordset of employees WHERE First_Name = valueFromSearchBox.
You could use your existing page - give the where clause a default value of '%' (a wildcard so it gets everyone) but when the user does a search it filters the recordset so you're left with people with that name.

You might also consider using LIKE in your where clause e.g. WHERE First_Name LIKE '%valueFromSearchBox%' so that it matches similar names.

Live the life you love
Love the life you live
~ ~ ~ ~ ~ ~ ~
<b>Simon Martin</b> - <i>DMXzone Manager</i>
<font size=1>[ Dreamweaver MX/MX2004 | ASP | SQL | XHTML/CSS | Web Accessibility ] </font id=size1>
Replied 08 Jul 2005 22:09:32
08 Jul 2005 22:09:32 nancy stefanik replied:
Hi I found this code snippet that does exactly what I'm looking for:
Dynamic Table Filtering.

www.codeproject.com/jscript/tablefilter.asp


Except that, in the example shown, the data seems to be static ? (not sure).

I have a table that is "drawn" dynamically with data from an Access Database. But would like to have the same type of search functionality and results as shown in the attached example. Is there some possible tweaking I might need to do to the code to have this effect?
If you could help me in any way, I greatly appreciate it.

Thank you,

Nancy

Reply to this topic