Welcome to the Web Developer and Business Applications Forum

Here's how you can participate: Below are the general forums where you can post. Select the one that best fits the topic you wish to address.

To create a new discussion thread/topic: click on the forum link below where you'd like to add your thread, such as Tips and Tricks Exchange. Then, once you've logged in, click on the New Topic link at the top. This will allow you to create a new thread.

To respond to a current thread or post: click on the forum where the post resides, then click on the link to the thread you are responding to, and at the top click the Reply link.

If you have any questions, please feel free to call us at 630-916-0662.



A Message Board, Guestbook, or Poll hosted for your website.
Register Login New Posts Chat
 
mrc > Forums > m-Power Tips and Tricks > Easy Forward Filtered selection criteria (or Cascading Dropdown Menus)
 
Username:  
Password:  
 
   
 


Thread Tools Search This Thread 
Reply
 
Author Comment
 
JoeStangarone
Moderator
Registered: 11/30/05
Posts: 26

    07/10/07 at 04:46 PMReply with quote#1

Many times developers want to guide users through selection criteria using drop down lists populated with valid values from the data-base. When multiple run-time selection criteria appear and the application narrows down the list of valid values in each drop down list based on what was entered in the last, we call this "forward filtered".

For example, if you have drop-down lists for state, county and city, choosing a particular state would repopulate the drop down lists for county and city to include only the counties and cities that are in that state.

There are many ways to accomplish this, but our new Web 2.0 report templates make it real easy. Here is an example of such an application. Anything you choose in one drop-down will narrow down available values in the other drop-downs based on the data in the data-base.

All we have to do to build the forward filter drop-downs in Web 2.0 reports is to assign the selection criteria field a user defined control code of "B". A user defined control code of "A" would give you a normal drop-down in ascending order without the forward filtering.

There is one other "magical" thing we did in this example that you may find interesting and useful. You will notice that the final application is a report with graph (3 graphs in fact). We have not yet published the Web 2.0 report with graph template. But we have published the standard Web 2.0 report template.

What we did was to build two identical reports. The first is using the standard Web 2.0 report template to build our forward filtered prompt page. We then modify one line on that page to call the second report (with graph) when the "Run Report" button is clicked.

That modification is as follows. We changed this line

Code:
 <input type="submit" NAME="btn_search" value="Run Report" class="button"> 
 


to this in the report prompt page.

Code:
 <input onclick="document.FORM_R00019.action = 'MRCSALESPT.R00011s';" type="submit" NAME="btn_search" value="Run Report" class="button">

 


Fast, easy, fun, and effective. Try it, and get something productive done today!

fanmechanic
Registered: 06/27/08
Posts: 7

    11/24/08 at 04:17 PMReply with quote#2

Is there a way to do the same thing for drop down lists created as external objects? This would be for use in a maintainer application. Based on drop downs, or external look-up retrievals, filter other drop downs or look-ups. I think I can try to manual adjust the external look-up call in the painter's source view, but the drop downs don't seem to have code there.
JoeStangarone
Moderator
Registered: 11/30/05
Posts: 26

    11/25/08 at 09:09 AMReply with quote#3

I recently did something like that, but not using drop down list external objects.

Instead, I used a web 2.0 single record maintenance program, this AJAX post, and a web 2.0 multi-record inquiry that I formatted as a drop down list.

I was thinking about publishing it, but it was a little tricky getting the multi-record inquiry formatted to work with the AJAX code.

The way it worked was, a user chose a value in a drop down box from the maintenance program, which fired off the AJAX request to re-fill the second drop down box on the maintenance program. It made for a very slick user interface.

Joe
Previous Thread | Next Thread
Reply

  Bookmarks  
Digg Diggdel.icio.us del.icio.usStumbleUpon StumbleUponGoogle Google

mrc (US)
555 Waters Edge
Suite 120
Lombard, IL 60148
630-916-0662
mrc (UK)
Argyle House
1 Dee Road
Richmond, Surrey
TW9 2JN
+44-20-8322-7720