recently used list

IfButOnly

Registered User.
Local time
Tomorrow, 07:35
Joined
Sep 3, 2002
Messages
236
I am wanting to create a recently used list for a couple of tables - eg Clients and Products. The idea being I will have a drop down list showing the last x clients accessed so the user can quickly access current clients. Same for Products. A client or product would only be shown once in the list.

i would appreciate some direction on the best way to go about the design for this. I could add date/time accessed to the tables and then have the drop down list sort and list the most recent - though this sounds inefficient.

If I create a separate table for the lists - do i have a separate row for each item or do I have one row that holds all the client ids and another for products.

Your help would be much appreciated.

Thanks ........... P
 
I have to say this sounds like a very good and simple idea.

I would probably have a single table, with a client/product flag, but you could have 2 tables. It won't make hardly any difference, I expect. Just each method gives you a slightly different development mechanism. Doing it with one table makes it easier for you to add the same solution for other searches.

I can't think your lists will be enormous, so re-sorting will be very quick. you could delete searches after a month, say, to prevent the list getting too long. probably more helpful to present searches sorted by name than by date, I would think.

separate row for each search, with a table like this

date, searchtype, valuesearched
12/11/15,1,client1 (use id's for the search detail)
10/11/15,1,client2
9/11/15,2,product1
 
Last edited:
Thanks very much Dave - very helpful. Will go just as you suggested and clear out any items dated over a set time frame (eg month).

Thanks again ................ Peter
 

Users who are viewing this thread

Back
Top Bottom