Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Filtering Master/Detail Page with a drop-down menu

New Here ,
Aug 17, 2011 Aug 17, 2011

Hey there!!!

I'm building a website where I list some products on a master page and can be clicked to get into details.

I do it through the Insert > Data Objects > Master Detail page and it works great...

but I can't filter the results of the master page with a drop-down menu.

Can anyone help????? I'm in a bit of desperation 😉

Thanks

Jaume

TOPICS
Server side applications
1.8K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Advocate , Aug 22, 2011 Aug 22, 2011

Yes, that is what happens - you will be passing a variable from the search page to the results page. The variable name is whatever you named the drop down list, such as MyDropDown. The value is whatever is the value of the selected item. So, now on the results page, create your recordset.Since we're using only one variable as a filter, use the simple mode. Working from top to bottom in the dialog window, give the recordset a name, select the connection and the table.  Under that, yo have four se

...
Translate
Advocate ,
Aug 18, 2011 Aug 18, 2011

The easiest way is to have a search page prior to the results page that contains your drop down. The page/form would submit to the master results page, and you would set up the recordset with the filer column, form variable and the name of the drop down box from the search page. You could also place the form with the drop down on the master page with the form action directing to the same page.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 18, 2011 Aug 18, 2011

Lon,

Thank you VERY much for your help.

My problem is that I'm a real newby in Dreamweaver and I'm not very familiarized with how to pass a variable and filter it with a recordset.

Is there any step-by-step tutorial you know that can help.

Once again thank you very much!

Jaume

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Aug 19, 2011 Aug 19, 2011

I'm actually in the middle of writhing one, but is not yet complete. I don't know of any others offhand, but I'm sure they're out there. The one I used way back when actually came with Dreamweaver. But there are only a few steps involved, we canntake it a step at a time here. Create a search page with a form, your drop down menu and submit button. These can all be found under insert- Form - . Select the drop down box, and in the Properties enter a name for it, something that relates to the database field you'll be filtering on, or for now just name it MySearchField. Now, Select the form itself, and in the properties set the Action to the Master Reslts page by using the browse and select folder. And  set the method to POST. The last thing you'll need to do with this page is populate the drop down with values, which can either be done by entreating static values, or getting them from a database table. Are you able to create a new table in the database?  I'll leave it at this step, and we can take complete it later if that's OK.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 21, 2011 Aug 21, 2011

Lon,

Thanks again!!!

I have already done all what you said in your post.

I understand that with the POST method I can pass a variable to filter the table, right??

I will wait for the next step.

Once again thank you very much

Jaume

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Aug 22, 2011 Aug 22, 2011

Yes, that is what happens - you will be passing a variable from the search page to the results page. The variable name is whatever you named the drop down list, such as MyDropDown. The value is whatever is the value of the selected item. So, now on the results page, create your recordset.Since we're using only one variable as a filter, use the simple mode. Working from top to bottom in the dialog window, give the recordset a name, select the connection and the table.  Under that, yo have four selections/entries to make. Select the database column you are filtering on, in the next, select "=". Below on the left select "Form Variable". The text box to the right of that will be Pre-populated with the column name. Replace that with your variable name, the name of the drop down from the search page - such as "MyDropDown" but without the quotes or anything else. Click Test and you'll be presented with a window asking for a value - enter any value that is contained in the drop down and ensure that the recordset is producing results and only records with that particular value. If it works, save it and you're good to go. If not then we'll do some troubleshooting.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 22, 2011 Aug 22, 2011

Ron,

You are the boss!!!!!!!!!

It is working beautifly. Thank you very much for all your help

Jaume

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Aug 23, 2011 Aug 23, 2011

Thanks, but let's not let Bruce Springsteen know he lost his title! : ).  I'm glad you were able to sort out my instructions as I do most of my forum posting on the iPad and for some reason it won't let me use the visual editor when entering posts, I have to switch to HTML where it ends up as one long paragraph.  Now that you have the basic search and results working, I'm sure you'll eventually want to expand on it, perhaps using more than one value for filtering, using text boxes for searching with entered values, etc. One thing to take note of, the more complex these searches get, the more important it is to have the database set up correctly and optimized. This is something that I'm feel adequate with, but others here are expert at, such as bregent. He has helped me several times in this area and  has stepped in a few times when I've provided suggestions to correct me or enhance my solutions with additional information.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 24, 2011 Aug 24, 2011
LATEST

Sure, let's leave the ttle for Bruce 😉

Lon, I hope to be learning more about Dreamweaver. I'm not a programmer so it will take me long (but rewarding...)

Thanks for all your help

Take care

Jaume

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines