Gossamer Forum
Home : Products : DBMan : Discussions :

Multiple selection in a popup-menu (select filed)

Quote Reply
Multiple selection in a popup-menu (select filed)
Hi,

I admit that this might be a truly stupid question, but I've been looking around and simply couldn't find the answer. I am looking for a way to search for multiple words (from a select field presented as popup-menu) which will be linked using the Boolean Mod.
Example: I have a list of research topics (eg Electrochemistry, Impedance, Ceramics, Coatings) which are visible in a popup-menu (ie a select field); let's assume that the field that holds this data is called 'ResearchTopics'. What I am looking for is a possibility to select more then one item of the list (eg electrochemistry AND ceramics, which would result in an URL containing '&ResearchTopics=electrochemistry ceramics&bool=and' somewhere) and to have dbman look for all these items. After instlling the multiple select filed MOD I get to select multiple fields from a select field (however not presented as pop-menu) but the problem is that the resulting url is something like '&ResearchTopics=electzrochemistry&ResearchTopics=ceramics'; however, dbman does not seem to understand this kind of syntax.
As I said before, I have the boolean mod installed and it works perfectly fine (if I do a search using a text box for entering the search terms).
Any help on how a multiple selection in a select field can be done would be greatly appreciated.

Thanx in advance

deppix

Quote Reply
Re: Multiple selection in a popup-menu (select filed) In reply to
Try checking the following thread references:

Thread reference: http://gossamer-threads.com/p/98079

Take a look at http://gossamer-threads.com/p/96491. It's all on one thread.

If you can't get the first code to work, try adding the code that's at http://gossamer-threads.com/p/96772 (same
thread).

Or you can view all these threads combined within the FAQ noted below under "Searching".

Searching by combining several drop-fields
http://webmagic.hypermart.net/dbman/search51.txt


Unoffical DBMan FAQ
http://webmagic.hypermart.net/dbman/
Quote Reply
Re: Multiple selection in a popup-menu (select fil In reply to
Hi LoisC,

thank you for your reply, but it seems that I did not make myself entirely clear. Your solution does work, IF the search terms is EXACTLY the combination of your separate search items. However, I would like to use multiple drop down menus (or one multiple select field) which would then be used to perform a boolean search on one specific field.
If I use the 'Multiple select filed mod (http://www.jpdeni.com/dbman/Mods/mult_select.txt) (with or without the boolean mod installed) and I do a search for different items selected in one select field, I will recieve a list of items containing either of the search terms.
Maybe I should discribe my problem more precisely.
I have three sets of data (called person 1, 2, and 3) each containing a filed specifying if they prefer red, blue, green, or a combination of them. Lets assume the following combination:
1. likes red and blue
2. likes red and green
3. likes red, blue and green
I'd like to be able to do a serach for all persons who like BOTH red AND green. The problem with the solutions you suggest is, that they would only look for the string "red green" if I was to select these two items and would therefore not return person 3.
I hope that this is more clear now.
Any suggestions would be appreciated.

Thank you in advance

adrian

Quote Reply
Re: Multiple selection in a popup-menu (select fil In reply to
Did you look under any other thread within the FAQ under "Searching"?

You may want to look at:

Search for A or B or E in a field

also

OR type searching

I know there are threads referenced which will provide you with a solution, you may just need to read through the various threads to come up with a solution that will work for you. I've made an attempt to title the threads in a way which it would best describe the thread, but there is usually more within a thread than you can tell by the title alone.

I'm sorry I don't have the time right now to search through all the postings to find your answer, but I know it can be found within the FAQ.

You may also want to check the threads listed under "Fields" and the subtopic "Working with Selects"

Unoffical DBMan FAQ
http://webmagic.hypermart.net/dbman/
Quote Reply
Re: Multiple selection in a popup-menu (select fil In reply to
Hi LoisC,

sorry for bothering again. I have looked at all the references you provided me with. Tried several of them, did searches myself (for several hours actually), and came up with nothing. The problem is always the same. ll of the searches that accept multiple input into one filed combine them using 'or' or as a string. I have however not found one single reference to a 'and'-search from various input fields.
Maybe anyone knows of such a solution and would like to share it with me.

Anyway, thank you again for the help and even so it has been most interesting to learn alittle about Perl

adrian