Query based on a dropdown list (query)

Hello
I have a dropdown list (populated with data from a query)
mysql_select_db($database_myconnection, $myconnection);
$query_groepen = "SELECT * FROM artikelgroepen ORDER BY groepomschrijving ASC";
$groepen = mysql_query($query_groepen, $myconnection) or die(mysql_error());
$row_groepen = mysql_fetch_assoc($groepen);
$totalRows_groepen = mysql_num_rows($groepen);
Now I want to show on the webpage all articles which are part of the article-group that I have selected from the above mentioned list (query)
Which parameter do I have to use in the query which follows :
mysql_select_db($database_myconnection, $myconnection);
$query_artikelen = "SELECT * FROM artikelen WHERE groep  ???????????";
$artikelen = mysql_query($query_artikelen, $myconnection) or die(mysql_error());
$row_artikelen = mysql_fetch_assoc($artikelen);
$totalRows_artikelen = mysql_num_rows($artikelen);
Thank you for your replies

Sorry, I don't have the time to script it for you. As I said before, you need to submit the form and use a URL parameter to display the result. This is the same principle as any filtered recordset.
Put your drop-down list in a form with the method set to GET.
In the second recordset, use the name of the drop-down menu as a URL parameter to filter the SQL query. (See the following Help page: http://help.adobe.com/en_US/dreamweaver/cs/using/WSc78c5058ca073340dcda9110b1f693f21-799da .html).

Similar Messages

  • Populating several textgroups based on two dropdown lists troubles

    Hi All,
    I have a dropdown list (case1) which contents "engine1", "engine2" and "engine3" and a second dropdown list (Component).
    If i select in "case1" = "engine1" then in "component" should be displayed "Motor" and "burner".
    it works this way...that's everything fine.
    ----- form1.#subform[0].#subform[1].Case1::enter: - (JavaScript, client) -----------------------
    var 
    arrayItems = eval(Case_1.value);
    for 
    (var i=0; i < arrayItems.length; i++) {this.addItem(arrayItems[i]);
    ----- form1.#subform[0].#subform[1].Case1::change: - (JavaScript, client) --------------------------
    if 
    (xfa.event.newText=="Engine1" || "Engine2" || "Engine3" );
    var 
    arrayItems = eval(Comp_0.value);
    for 
    (var i=0; i<arrayItems.length; i++) {Component.addItem(arrayItems[i]);
    ----- form1.#subform[0].#subform[1].Component::enter: - (JavaScript, client) -----------------------if  (xfa.resolveNode("form1.#subform.Case1").rawValue == "Engine1"){
    xfa.resolveNode("form1.#subform.Component").clearItems();
    var arrayItems = eval(Comp_0.value); 
    for (var i=0; i < arrayItems.length; i++){
    this.addItem(arrayItems[i]);
    if  (xfa.resolveNode("form1.#subform.Case1").rawValue == "Engine2"){
    xfa.resolveNode("form1.#subform.Component").clearItems();
    var arrayItems = eval(Comp_0.value); 
    for (var i=0; i < arrayItems.length; i++){
    this.addItem(arrayItems[i]);
    if  (xfa.resolveNode("form1.#subform.Case1").rawValue == "Engine3"){
    xfa.resolveNode("form1.#subform.Component").clearItems();
    var arrayItems = eval(Comp_0.value); 
    for (var i=0; i < arrayItems.length; i++){
    this.addItem(arrayItems[i]);
    then if i select "motor" then should be visible a group "engine1Motor", "engine2Motor", "engine3motor".
    if i decide to select "burner" after "motor" the group which belongs to Motor should stay visible and a new group should which belongs to burner "engine1burner1", "engine1burner2", "engine1burner3" should be visible.
    and if case2 is filled then a new goup "1.ifcase2", "2.ifcase2", "3.ifcase2" should be visible.
    I tried it this way but it doesnt work :-(
    ----- form1.#subform[0].#subform[1].Component::change: - (JavaScript, client) ----------------------
    if  (xfa.resolveNode("form1.#subform[0].Case1.rawValue") == "Engine1"){
    xfa.resolveNode("form1.#subform.Component.rawValue")
    == "engine1Motor"; 
    Motor.presence
    = "visible";}
    else{
    Motor.presence= "hidden"}
    who can help me to solve this problem??
    Thank u!!
    D.

    Hi,
    The script in itself looks okay, but there are a few things to check:
    That the language is JavaScript.
    That the values your are testing against EITHER match the Item values (in the Object > Field palette) OR the bound values (if specified in the Object > Binding palette).
    I am presuming that this script is in the calculate event of the dropdown.
    The relative references between the objects is not full enough. See: http://assure.ly/kUP02y.
    I think that you could achieve this in an easier way!!!
    Select each of the dropdowns. In the Object > Field palette you will have the items listed. Okay, nothing to do here.
    Now go to the Object > Binding palette and tick specify values. Then for Category 1 specify PN1, Category 2 specify PN2, etc. Similarly for the product dropdowns: Product A specify A, Product B specify B, etc.
    Then in the caculate event of the textfield you would use FormCalc to concat the dropdowns:
    $ = Concat(Dropdown1, Dropdown2)
    I appreciate that the product dropdown is populated based on the users selection in the Category, but you can script the bound value.
    See examples here: http://assure.ly/fYCuQ2, and especially this one: http://assure.ly/jcTahK.
    Also if you want searchable dropdowns: http://assure.ly/mP5Lud.
    Good luck,
    Niall

  • How to populate a textfield based on a dropdown list and a checkbox

    Hi Guys,
    I need help.
    first step: I have a dropdown list if i click in dropdownlist "a" and put in numeric field a number bigger than 99 the, checkbox should be marked and  second step: a textfield1 should be visible.
    the first step works perfectly but the second doesnt work.
    this is my coding for the second step in event : change java script
    if ((DropDownList1.rawValue == "a") && (this.rawValue == 1))
    TextField1.presence = "visible";
    else
    TextField1.presence = "hidden";
    does anybody have any idea why?
    thanks!!
    Diana

    Hi,
    I would put the following in the exit of the dropdown and the checkbox:
    if 
    (DropDownList1.rawValue == "a" && CheckBox1.rawValue == 1){
    TextField1.presence
    = "visible";}
    else
    TextField1.presence
    = "hidden";}
    (the script is all over the shop, but should be OK in the form).
    Then in the exit event of the numeric field (after the changing of the checkbox value) you could call the checkbox exit event.
    Good luck,
    Niall

  • Query based Report (Reports From SQL Query)

    Hi All,
    I am facing a problem with a report. I need your help.
    I am creating a Report From SQL Query (Portal) with some arguments passed at runtime. I am able to view the output, if the query returns few rows ( arount 1000 rows). But for some inputs it needs to generate >15000 records, at this point the page is getting time out (i think!) and showing error page. I am able to execute query from the SQL Plus console ot using TOAD editor. Here the query is not taking more that 2 mins time to show the result.
    If i am executing from Portal i observed that, once i give the appropriate input and hit submit button a new oracle process is getting created for the query on UNIX (I am usign "TOP" command to check processes). The browser page will be shown error page after 5 minutes (i am assuming session time out!) , but on the backend the process will be executed for more than 30 mins.
    Can i increase a timeout of portal page, how i can do this?
    The data returned as a result of the query is sized more than 10 MB. Is caching this much data is possible by the browser page? is the returned data is creating any problem here.
    Please help me to find appropriate reasone for the failure?

    Can you post the URL that is giving you the page not found error ? I am not sure if I can be of much help though.
    In order to increase your chances to get a reply you should also post your question in the Portal Forum - Oracle Application Server Portal
    Edited by: Rodolfo Ferrari on Jun 16, 2009 3:49 PM

  • Setting the value of a field based on a dropdown list

    I am using the latest production release of JHeadstart 10.1.3.0.91. I am trying to set the value of a field based on selecting the value of another field (drop down list). The drop down list field has the following attributes set autoSubmit="true" immediate="true" valueChangeListener="#{jhsPageLifecycle.updateModelValue}".
    The other field has the partialtrigger set to the first field. ie "depends on" selection from JHeadStart file. The value of the second field is set in the setter of the VO RowImpl java file.
    The value of that field is only populated on the screen if it is set to disabled="true". This seems a bit bizzare behaviour. Can you explain why it cannot set the value of the field when it is not disabled.

    Worked out that if i set the "Clear/Refresh value" attribute on the field that i want updated then it will work ok
    Alan

  • Unhide subform based on 2 Dropdown Lists

    I would like to be able to unhide a subform when the answers in dropdown1 and dropdown2 match, if they don't match then the subform would not open.
    Any advice would be grateful

    Hi,
    Try something like this JavaScript in the calculate event of the subform you want to unhide;
    if (DropDownList1.rawValue == DropDownList2.rawValue)
        this.presence = "visible";
    else
        this.presence = "hidden";

  • Select List (query based LOV) in a wizard created report form

    I have created an updatable report form with 3 columns:
    app_id
    user_id
    group_id
    Each app_id has multiple group_id's associated with it, and I want to show the group_id field as a Select List (query based LOV) that contains the groups associated with the app_id.
    My query for the select list needs to be similar to the following:
    SELECT DISPLAY_NAME, GROUP_ID
    FROM APPLICATION_GROUPS
    WHERE APP_ID = ?????
    ORDER BY 1
    The problem is, I don't know how to reference the app_id from the main report to replace the ?????.
    In other words, if my report returns 2 rows of data like this:
    app_id----------user_id----------group_id
    1-----------------24------------------3
    2-----------------24------------------15
    Then how do I get the group_id column to be a select list of possible groups for each application? If app_id 1 has 3 groups associated with it, 3, 4, & 5 and app_id 2 has 2 groups associated with it, 15 & 16, then those each of the select lists should be based on the app_id.
    Hopefully I explained this clearly.
    Thanks,
    Kris

    Leo,
    Thanks for the response, but I don't think you quite understand my problem. If I go to the Column Attributes screen for the group_id field, I have the "Display As" drop down set to "Select List (query based LOV)", not "Select List (named LOV)". This requires that the sql query be written in the "List of values definition" text area below. Within that text area I have the following query:
    SELECT DISPLAY_NAME, GROUP_ID
    FROM APPLICATION_GROUPS
    WHERE APP_ID = ?????
    ORDER BY 1
    The APP_ID that I need to reference is for the current row of data that is being processed. Therefore, I can't use a :PNNN_APP_ID variable, because that field does not exist on the page.
    Hopefully this explains it a little better.
    Thanks,
    Kris

  • Select List (query based LOV) in V. 4.1.1.00.23

    Hi guys,
    I am having some problems with an APEX application that I have exported from V. 4.1.0.00.32 and imported on V. 4.1.1.00.23.
    I have a Tabular Form region where I have a column which is Display As "Select List (Query based LOV)".
    If I add a new row - choose a new value (not the same as any of the above rows) and "Apply Changes"/"Submit" the value in the new row changes to the value of the 1. row of the tabular form :-( I can update this new row and then it saves the right value... It looks like it is only when inserting a new row.
    Is this a bug or is it a feature ;-)
    Hope you can help...
    /Rene

    Leo,
    Thanks for the response, but I don't think you quite understand my problem. If I go to the Column Attributes screen for the group_id field, I have the "Display As" drop down set to "Select List (query based LOV)", not "Select List (named LOV)". This requires that the sql query be written in the "List of values definition" text area below. Within that text area I have the following query:
    SELECT DISPLAY_NAME, GROUP_ID
    FROM APPLICATION_GROUPS
    WHERE APP_ID = ?????
    ORDER BY 1
    The APP_ID that I need to reference is for the current row of data that is being processed. Therefore, I can't use a :PNNN_APP_ID variable, because that field does not exist on the page.
    Hopefully this explains it a little better.
    Thanks,
    Kris

  • OnChanger="get_ajax_select_xml(this);" with  select list (query named LOV)

    Hello,
    i used Vikas'example Re: cascading lov for tabular form
    i have a problem with Select list (query based LOV)
    when run tabular form i have the following error:
    report error:
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    the number of rows of the Lov are 900
    the display variable is 70 char
    is there any limit?
    Thank in advance
    Costanti

    Leo,
    Thanks for the response, but I don't think you quite understand my problem. If I go to the Column Attributes screen for the group_id field, I have the "Display As" drop down set to "Select List (query based LOV)", not "Select List (named LOV)". This requires that the sql query be written in the "List of values definition" text area below. Within that text area I have the following query:
    SELECT DISPLAY_NAME, GROUP_ID
    FROM APPLICATION_GROUPS
    WHERE APP_ID = ?????
    ORDER BY 1
    The APP_ID that I need to reference is for the current row of data that is being processed. Therefore, I can't use a :PNNN_APP_ID variable, because that field does not exist on the page.
    Hopefully this explains it a little better.
    Thanks,
    Kris

  • I am designing query based on dso

    Hi,
             i am designing query based on dso. in my query  production orders have multiple operations.when i execute my query report is showing only latest operations.we need to all operation.how can i fetch.
    ex :   production order                  operation
               100000141                            10,20,30,40,50
    when i exceute the query query is showing only  100000141 & 50.query is not showing 10,20,30,40 opeartions.please help me.
    Thanks & Regards,
    chandu.

    Hi Chandu,
    Check for the filters and variables for production order operation
    in query designer.
    Also check if that field is restriced to particular values, and check for any periodic restrictions.
    Hope this helps...........
    Rgs,
    I.R.K

  • Adobe Form Section is Not Showing When Value is Selected from Dropdown List

    Hello Experts
    We have this issue where an ADOBE FORM is embedded in a WEBDYNPRO APPLICATION. 
    When selecting a value from the dropdown field in the ADOBE FORM, some particular section in the ADOBE FORM is not shown.
    Here's the ADS and NW versions that we were using.  We are running on EHP5 landscape.
    - ADS - 7.3 SPS 3
    - NW 7.3 SPS 3
    PS. The same program is working in EHP4 correctly.
    Any idea on how to resolve this issue?

    This is a custom built form, the thing is we just upgraded our system to EHP5 and we are in the test phase. The same form works in system in EHP4.
    Based on the dropdown list selection, there are some sections in the form which are hidden previously will be shown now. when you change the country in the dropdown the new sections appear. The sections will not be visible before you select the couuntry from dropdown.
    Should I upgrade my Adobe live cycle designer version to a higher one?
    Thanks

  • BEx query based on virtual cube donu00B4t display a valid List of Value (LOV)

    Hello
    I have a problem with an invalid LOV. The scenario is the following; There´s a BEx query based on a virtual cube. The query has an exit variable on caracteristic that is based on 0CALMONTH.
    At Universe Designer I simply create a connection, a universe based on this query and export.
    At Web Intelligence (also at Live Office), when I try to execute de query, the prompt to fill my exit variable display a list of value that doesn´t match with the values of the caracteristic at the cube.
    Actually, the list at the prompt starts with 01.0000 and finishes with 05.0968.
    In Universe Designer, the option to edit the list of values is not available. But I think that editing the LOV is not the correct way.
    I´ve tried creating a new query based on the DSO that is the source of the virtual cube. In this case, I had a valid list. Unfortunately, I can´t use this DSO.
    Did anyone already have this problem?

    Hi James,
    can you explain what you mean with "input length for that filed" ?
    The field in the table is varchar2(120). I coudn't found options for the List of value.
    Thanks for your response
    Carsten
    null

  • Character string buffer too small (select list query based LOV)

    Hi,
    Using the select list query based LOV with a select witch is too big, you get this error.
    report error:
    ORA-20001: Error fetching column value: ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    When using the Popup LOV query based LOV) then it works nice.
    Can that be solved somehow?
    With the Popup LOV the return value is displayed in stead of the description.

    Hi Andy,
    How do I incorporate your suggestion on a report ?
    Example : I have
    select apex_item.display_and_save(1,column1,5) col1,
    apex_item.display_and_save(2,column2,5) col2 ,
    apex_item.popup_from_query(3, emp_name, 'select user_name, name  empname from table2) col3
    Table 2 is a long list , and I'm getting string buffer too small due to this.
    Your suggestion with HTP is good but I'm not sure how to implement it for reports as I'll like the user to change the values with the select_list.
    I'm not using forms as they want mulit-record on the same page.
    Hope to hear back from you soon.
    Thanks very much.

  • Tabular form (select list Query based LOV)

    Hi all,
    I have this situation:
    a tabular form with two "select list (query based LOV)" fields.
    The first one must affect elements in the second one. And so the second query based LOV field should has a "where attr1 = first_list_selected_value" in the query.
    Is this possible ? Could you show me some advices ?
    thanks in advance.

    OK, thank you.
    But maybe I wasn't too clear.
    I need cascading LOV for each row of my tabular form.
    I have a EMP tabular form
    select
    "ROWID",
    "EMPNO",
    "ENAME",
    "JOB",
    "MGR",
    "HIREDATE",
    "SAL",
    "COMM",
    "DEPTNO"
    from "#OWNER#"."EMP" I need a Select List for DEPTNO for each record of table. After set a value, the second "Select List" for ENAME should be affected automatically.

  • Defaulting value of Dropdown List to the first value of a BI Query

    Hi,
    In my VC application I have a form containing a dropdown list to be used as selection criteria for other data.  The dropdown list is dynamically populated by a BI Query.  When I run the application, the dropdown list is correctly populated with the values returned by the linked query.  However, on initial load of the iView, the default value of the dropdown list is blank.  The requirement is for the first item returned by the linked query to display as the default value.
    I would appreciate any suggestions on how to achieve this requirement.
    Thank you,
    Mustafa Bensan.

    Hi Mustafa,
    I checked your requirement but it is not possible to display first value as default value for a drop down list because the list will be generate when you click the drop down list. You can use a 'list box' instead of drop down list.
    Regards
    Basheer

Maybe you are looking for

  • How to change the size of Bex Variable screen?.

    Hi Experts, Can we able to change the size/font of the Bex query variable screen?. I have a requirement where lot of variables used but query variable screen is not showing up all the variables including the 'execute,cancel, check' menu buttons. Is t

  • Javax.mail.MessagingException: Missing start boundary

    I use the following code creates a Mime file MimeMultipart mmp = new MimeMultipart();                MimeBodyPart mbp = null;                // add rootpart                mbp = new MimeBodyPart();                mbp.setContentID("[email protected]");

  • Banding occuring with Lacie 321 as external monitor?

    Please help me. I have just purchased a Lacie 321 lcd monitor and everything was splendid until I decided to take a look at my pictures. This phase of this story is crucial, as I am a professional photgrapher and this new lcd monitor will be used to

  • BOE XI 3.0 SDK

    Hi Everybody, I am new to this forum. In our office, we have installed Business Objects Enterprise XI 3.0 recently.. Previously we have the Release 2 version. Using the SDK from release 2, we have created .net application to show the reports from Bus

  • 5 messages always in Adapter Engine

    Hi All, There is 5 messages' status is Delivering. I have tried to resend it but failure. How to handle the Delivering messages ? need to restar XI J2EE Engine?