Drop Down Menu selection query for recordset.

I am looking to utilize a dynamic drop down menu to query a recordset...I am using Colfusion to import an MS Access database that contains the following fields: "Model Date", "Name", "Points" and "Target".  Each time the database updates, the "Model Date" field contains the date and time the model was run.  I have figured out how to create a dynamic drop down using SELECT DISTINCT "model date" and have also figured out how to create the dynamic recordset to be displayed showing the "Name", "Points" and "Target" data. 
I want the user to select the "Model Date" from the drop down, hit a submit button and then have the appropriate "Name", "Points" and "Target" data queried and shown below.
The query should take the selection from the "model date" dropdown and then query the "name", "points" and "target" fields for that particular "model date"
I admit my knowledge of SQL and Coldfusion is not the best, but it seems like this is a somewhat simple task and I am just missing one or two pieces of the cog to put it all together.
The database basically looks like this:
Model Date...........Name..........Points........Target
8/1/2010 08:00......John Doe.....1,250.........5.55%
8/1/2010 08:00......Jane Doe.....850............2.35%
8/1/2010 08:00......Bill Smith....11,832........-123.23%
8/2/2010 09:02......John Doe.....1,323.........6.67%
8/2/2010 09:02......Jane Doe.....1,001.........3.21%
8/2/2010 09:02......Bill Smith....10,235........-110.26%
The dropdown will only show the "model dates"
8/1/2010 08:00
8/2/2010 09:02
For example, if 8/1/2010 08:00 was selected from the dropdown, I want the following displayed:
Name..................Points...................Target
John Doe.............1,250....................5.55%
Jane Doe.............850.......................2.35%
Bill Smith............11,832...................-123.23%
Any help or suggestions would be greatly appreciated!!!
Thanks,
Mike

My second paragraph talks about just displaying the filtered data, so I'm assuming that's what you're looking for, but still not quite sure based on what the other responses are. 
But I head on anyway -
On your first page, make note of the instance name of your drop down menu, such as "ModelDate".  Make sure it's in a Form and set the form action to the page where you want to display your data, set the form action to POST.
On the results page, create a table with cells for each of the data elements you want to display. Create a recordset which you can do in Simple mode. Leave it at select all, and set the filter drop down to the database field which contains your Model Date. In the box to the right, select "=". the next dropdown selct "Form Variable" and the variable name type in the instance name of the drop down on the first page. 
I may not have the terminology right, doing it from memory.
From the data bindings tab, expand your recordset and locate each of the database fields you want to display.  Drag each one to the table cell on the page where you want it displayed.  The table cells have to be in a linear row.
Now, select the table row buy selecting the TR tag in the tags just above the properties panel.  In the server behaviors tab, select repeat region and "All Records"
Publish your pages and test!

Similar Messages

  • How do I make a drop down menu selection show up in another web page?

    What I am trying to accomplish is this.  I have a page with various drop down menu selections that I want to transfer the selection to a secured web page. What happens now is once the selection is made it goes to the secure page but then the user has to again select the choice again.  Is there way to keep the selection chosen in the linked page?

    You can set the "selected" value in the second page based on the input from the first page.
    Ignor the language referance used below for the example and simple use the concept with your desired language.
    Second Page form:
    <form id="form1" name="form1" method="post" action="">
      <select name="testing" id="testing">
        <option value="Value 1" <% if ( Passed values == Value 1 ) { %>selected="selected"<% } %>>Lable 1</option>
        <option value="Value 2" <% if ( Passed values == Value 2 ) { %>selected="selected"<% } %>>Lable 2</option>
      </select>

  • Created a new folder in bookmarks; when try to add new bookmark, new folder does not appear in drop down menu; using safari for windows

    created a new folder in bookmarks; when try to add new bookmark, new folder does not appear in drop down menu; using safari for windows

    You are using an older version of firefox, upgrade your browser to Firefox 8 and try
    * getfirefox.com

  • Triggering a database query and region update from drop-down menu selection

    I suspect this must be covered somewhere in some how-to or documentation but Google hasn't been of much help here:
    A user is filling in a form. The first entry in the form is a drop-down menu. Upon the user selecting a value in the menu I would like to query existing entries in the DB and present results to the user, in a region to the right hand-side of the form, as guidance (i.e.: "here's what we already have for this component").
    I am unclear as to whether I should be using computations, javascript or a combination of both here. Pointers welcome. Thanks in advance.

    Hello,
    Take a look at this example, it does what you want.
    http://apex.oracle.com/pls/otn/f?p=11933:48
    Regards,
    Carl
    blog : http://carlback.blogspot.com//
    apex examples : http://apex.oracle.com/pls/otn/f?p=11933:5

  • Font Selection - Drop Down Menu Selection

    Hello All,
    I have a general question about the FONT selection in the menu bar in iBA that has been puzzling me.
    Sometimes when I select a font within a text box and move over to the Drop Down menu within iBA the default view is the top six most recently used fonts.
    At other times the font selection moves down the long list of fonts alphabetically — say to Helvetica.
    I have being playing around with the key combination keys to see if holding command key or a combination will change this.
    By holding down the ALT / Option key turns the FONT PREVIEW view OFF so the menu is more compressed and maybe faster to load.
    Any thoughts on this would be great. I would really like to be able to jump to my top six recently used fonts by holding down a hot key rather than at random times as it seems to me right now.
    Any view?
    Regards,
    Nigel
    TOP SIX MOST RECENT FONTS
    ALL THEY WAY DOWN THE LIST

    I downloaded it again and reinstalled it, restarted my pc, restarted illustrator, and it still didn't work - but, with my type selected, I went to Type -> Find Font and from there I managed to change it into aurulent_sans_mono ok. but even after that I still can't select it in the other ways. It's probably just a bug but at least I've found a way round it.
    thanks for trying it out

  • Drop Down Menu Selection - Make Other Drop Down Menus Visible

    I am having some trouble with a simple if-else statement. When a certain selection is made in a drop down box, I would like two other drop down menus to appear. (At runtime, they are hidden.) The current problem is that when I try and select anything in the drop down menu, it will only allow me to select this one option. (If I try to select anything else, it reverts back to the same thing every time.) If I set the "if" statement to trigger for something else, then that option is all it will display and so on. I have made plenty of these types of scripts in other areas of this PDF, but I can't figure out why it isn't doing what I want it to now.
    The "change" event is what I currently have this set to. I have also set it for the "enter" event with no change.
    if (this.rawValue = "Ankle/Brachial Index (ABI) - 93922")
    ABI.presence = "visible"
    TBI.presence = "visible"
    else
    ABI.presence = "hidden"
    TBI.presence = "hidden"
    If there's a better way to do this than the method  I am attempting to use, please don't hesitate to suggest it. I am definitely open to learning new methods.

    Thanks, man! I knew it was something simple I was missing. Those are my favorite kind of fixes.

  • No drop down menu in inquisitor for search engines

    In preferences the google, yahoo &  bing seach engines show in the drop down menu but I can't select any of them.  In inquisitor those 3 plus duckduckgo show up and duckduck is set as the default.  However I don't get a drop down menu to make changes.  Apple Care couldn't help me & I spent 2 hours + at the Genius Bar last night with no solution. I'm on a MacBook Pro with Lion 10.7.2 and I have Glims for Safari installed.

    When setting up the Express di dyou join the network created by the Extrme using WDS?
    Application/Utilities/Airport Admin Utility > Select the Extreme, the final tab on the right should read WDS.
    Enable this base station as a WDS: main base station
    Allow wireless clinets on the base station, check
    Select your Express form the list.
    The rest I can't remember, but hopefully this will get you started!
    Will
    1GHz G4, 15" PowerBook, Airport Extreme & Express, 1G iPod Mini   Mac OS X (10.4.6)  
    Help others by marking solved questions as answered ( + Solved or Helpful )

  • Drop down menu selections

    i have extracted columns from a database into a drop down menu however i need to name each option so that the right information can be extracted onto another page. the <%=rs.getString("OU")%> defines the difference however how cud i recognise each selection on that page?
    <%
    try {
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    con = DriverManager.getConnection("jdbc:odbc:fa1lnk4");
    int i=1;
    %>
    <select name = "things">
    <%
    while(rs.next())
    {%>
    <option value = "pc">
    <%=rs.getString("PC")%><%=rs.getString("PCN")%>
    <%=rs.getString("OU")%></option>
    <%
    i=i+2;
    catch (Exception e) {
    System.out.println(e);
    e.printStackTrace();
    %>

    I did not understand that. Which page? Yours? Their? Have you made up your mind what the HTML should look like, a static example, perhaps. Then it will be easy to construct the same HTML dynamically from the JSP.
    Also, it is said ten times a day here, but I will repeat it: do not mix DB-related and presentation-related code, i.e. have a separate class do the DB-related things and the JSP call this class.

  • Drop down menu box query

    How do I stop the drop down menu box from always appearing when try to open anything?

    Use trackpad and mouse gestures
    http://docs.info.apple.com/article.html?path=Mac/10.7/en/mh35869.html

  • I'm using Mac with OS 10.9.4 and Photoshop CC. I am unable to access "Focus Area Selection". When I go to "Select" on menu its simply not there in the drop down menu. Any help?

    How do I access "Focus Area Selection" in Photoshop CC on a Mac? It's not showing in the "Select" drop-down menu.

    Select > Focus area is in Photoshop CC 2014, not Photoshop CC.  So you must download and install CC 2014 to have access to this new feature.

  • Restricting the drop down menu contents in CRM BSP application for portal

    Dear All,
    I have a problem with CRM BP where I am accessing a BSP application for ACTIVITIES - SEARCH "CRMD_BUS2000126_F4" as an iview. This iview has been assigned to a user who is an external employee of the organization. This contains a drop-down menu to search for ACTIVITIES based on user's choice(ME, MY DEPT, MY GROUP..etc). My problem is to restrict the choices in the DROP-DOWN menu to only ME and remove all others.
    How do i do that???
    rgds
    Chan

    Hi Chan,
    u r on right track.
    Save the changes that you make to the field group (entering a default value and tick 'read-only')
    I hope you are changing the field-group in CRMC_BLUEPRINT_C.
    after u have saved the canges to the fieldgroup, you need to re-gerenate the layout.
    Layout of User Interface (People-Centric UI) -> Application Element -> Field Group -> Layout Generation.
    Enter the name of the fieldgroup that u just changed.
    First run it as it is (with the "Only Check Field-Groups" ) to see if it is running into any errors.
    If there are no errors, Make sure that you remove the "Only Check Field-Groups" option and then execute.
    The layout will b generated and you should see the desired changed now.
    Hope this helps. / reward points if helpful..
    Regards,
    Raviraj

  • Multiple drop down menu items to populate the a separate text box...more help please

    Thanks to Gilad D67 for showing me how to have multiple drop down menu items appear in a separate text box. This stuff blows my mind. Is there any script I can use to make a new drop down menu item appear in the same text box, but on a new line below a previous entry. For example. I select 'cat' from my drop down menu and it appears in my text box. Now I choose 'dog' from my menu and it appears in my text box like so  'cat dog.' Is there any way I can make 'dog' go straight to a new line automatically without having to manually go into the text box and change it?
    cat
    dog (new selection goes straight to a new line)
    Now, I don't have a clue if this is also possible, but imagine, I don't like my drop down menu selection of 'dog' and I go back into the menu and I change to 'rat' but in the text box, 'dog' still appears and 'rat' is added. Do I have to manually delete 'dog' from the text box or is there script that can do this for me.
    Any assistance would be incredible. It amazes me how people know this stuff.
    This is the script I have so far
    (function () {
        // Do nothing if not committed
        if (event.willCommit) return;
        // Set up an array to hold the individual paragraphs of text
        var aQuotes = [3];
        // Populate the array with the paragraph text
        aQuotes[0] = "Use common singular nouns, plural nouns [plural ‘s’] and proper names to say what things are"
        aQuotes[1] = "Use numbers 1–10 to count"
        aQuotes[2] = "Use basic adjectives and colours to say what someone/something is or has"
        // Get the selected item, which is the export value of the selected combo box item
        var item = event.changeEx
        // Display the text corresponding to the selected item in the text field
        getField("Text30").value += " " + aQuotes[item];

    You have to set the option for the text field to be multiline and then change the last line of the script to:
    getField("Text30").value += "\r" + aQuotes[item];
    To reset the field you can use a separate button with a Clear Form command, and then you just select this one field from the list.

  • Drop down menu poulated by 2 db columns

    I have a form where I enter information into a table. There is a drop down menu in the form where the id is connected to another table. Basically I'm pulling names from another table. I've got an id that connects fine.
    However, I'd like to pull 2 columns into the one drop down menu selections. I n my other table I have a firstname and lastname column. I'd like to pull both those columns into the one drop down menu.
    Ideally each line in the drop down menu would read "lastname, firstname"
    Thanks in advance!
    Peter T

    what database are you using ?
    u can simply do like this..
    for example..
    SELECT concat(convert(FirstName using UTF8)," - ",convert(Lastname using UTF8)) as FullName, userid
    FROM employees
    here i concat two fields Lastname and firstname
    this is mysql specific.
    if u still cannot do it
    post ur table schema here i will write it for u
    hope this helps.
    Regards.
    mohnkhan
    http://www.mohitech.com

  • Error message based on text in a drop-down menu...

    So I have a simple number field and a text drop-down box (with, let's say, the values "Blue", "Red" and "Green".)
    I want to set a minimum and maximum (say between 5 and 20) value on the number field and send an error if the user enters a number outside of that range. BUT the range can be different depending on if the user selects Blue, Red or Green from the drop-down menu.
    So for Blue, the range might be 5-20; for Red 7-22, and Green 10-25.
    SO if the user chooses Blue then enters a 4 or a 21, he'll get an error message prompting him to specifiy a value that is from 5-20.
    That's it, in a nutshell.
    Any help I could get would be awesome. Thanks in advance.
    Thanks,
    T.

    There are several events to consider here:
    1. The drop-down value is changed without any values in the text field
    2. The drop-down value is changed with a value in the text field
    3. The value of the text field is changed (I'm assuming there's no "blank" value in the drop-down, or there will be another event, where the value of the text field is changed when the "blank" option is selected)
    You need to decide how to treat each event. I would recommend resetting the text field each time the value of the drop-down is changed. Otherwise you will need to perform the validation from two different sources.
    To do that add the following code to the drop-down's custom validation script (replace "Text1" with the actual field's name):
    this.resetForm(["Text1"]);
    The code you can use for the text field can be something like this, as the custom validation script (replace "Color Selection" with the actual field's name):
    event.rc = true;
    if (event.value) {
        var color = this.getField("Color Selection").value;
        var min=0,max=0;
        if (color=="Blue") {
            min = 5;
            max = 20;
        } else if (color=="Red") {
            min = 7;
            max = 22;
        } else if (color=="Green") {
            min = 10;
            max = 25;
        var v = Number(event.value);
        if (v<min || v>max) {
            app.alert("Error! The value must be between " + min + " and " + max);
            event.rc = false;

  • Double horizontal spry drop down menu bar problems

    Hello Everyone,
    I'm new to the spry tools and I need a little help. This is what I'm trying to accomplish in Dreamweaver CS4:
    I need 2 horizontal spry menu bars for navigation. I have created a div for each spry tool, 1 div placed above the other and they cross the entire width of the page. I have created the spry menu bars. Everything seems to be working correctly in both menu bars, That is until you open the IE browser, all other browsers tested fine. The problem is that when you hover over the bottom menu bar in IE, the drop down menu does not drop all the way down. The first submenu of the drop down menu covers the main menu bar. I have tried to change the css for the spry menu bar at the ul.MenuBarHorizontal li.MenuBarItemIE to show the display: as inline and also tried block and niether had any effect. Someone please help. Thanks.
                        css spry drop down menu 1
    /* HACK FOR IE: to stabilize appearance of menu items; the slash in float is to keep IE 5.0 from parsing */
    @media screen, projection
              ul.MenuBarHorizontal li.MenuBarItemIE
              display: inline;
              f\loat: left;
              background: #FFF;
                       css   spry drop down menu 2
    /* HACK FOR IE: to stabilize appearance of menu items; the slash in float is to keep IE 5.0 from parsing */
    @media screen, projection
              ul.adminbarh li.MenuBarItemIE
              display: inline;
              f\loat: left;
              background: #FFF;
    This site is not yet live. If anyone is willing I can send an attachment of my complete spry CSS via email.  Contact me at [email protected]
    See what I got here. www.prospectingtreasures.com

    Hello Everyone,
    I'm new to the spry tools and I need a little help. This is what I'm trying to accomplish in Dreamweaver CS4:
    I need 2 horizontal spry menu bars for navigation. I have created a div for each spry tool, 1 div placed above the other and they cross the entire width of the page. I have created the spry menu bars. Everything seems to be working correctly in both menu bars, That is until you open the IE browser, all other browsers tested fine. The problem is that when you hover over the bottom menu bar in IE, the drop down menu does not drop all the way down. The first submenu of the drop down menu covers the main menu bar. I have tried to change the css for the spry menu bar at the ul.MenuBarHorizontal li.MenuBarItemIE to show the display: as inline and also tried block and niether had any effect. Someone please help. Thanks.
                        css spry drop down menu 1
    /* HACK FOR IE: to stabilize appearance of menu items; the slash in float is to keep IE 5.0 from parsing */
    @media screen, projection
              ul.MenuBarHorizontal li.MenuBarItemIE
              display: inline;
              f\loat: left;
              background: #FFF;
                       css   spry drop down menu 2
    /* HACK FOR IE: to stabilize appearance of menu items; the slash in float is to keep IE 5.0 from parsing */
    @media screen, projection
              ul.adminbarh li.MenuBarItemIE
              display: inline;
              f\loat: left;
              background: #FFF;
    This site is not yet live. If anyone is willing I can send an attachment of my complete spry CSS via email.  Contact me at [email protected]
    See what I got here. www.prospectingtreasures.com

Maybe you are looking for