How work with tow select list

Dear All
i have tow  select list item
first one is country
and the second one is city
how can i get all city for selected country?
please help

Hi,
The simplest way
a. Make Country a select list with submit.
b. Make City a slect list based on query and in the query add the condition
and country = :P1_country -- where p1_country is the item in step a abovec. Make City conditional by adding a condition on the item of the type Value of Item in expression 1 is not null, and in expression 1 enter p1_country.
This way when the user lands on the page only Country will display. Once cuntry has been selected the page will submit and now the City item will be displayed with the values returned by its query.
Regards,

Similar Messages

  • How to write a javascript function on a report column with type select list

    I have a report with a select list column:
    HTMLDB_ITEM.SELECT_LIST_FROM_LOV(22, "tablename"."PRIMARY", 'PRIMARY').
    The value of primary can be null, yes, no. I want to write a javascript to achieve this: once the user changes one primary value to be yes, others with 'yes' will be changed to 'no' automatically.
    Could somebody help me on this.
    Thanks.
    Jen

    Thanks Patrick for your quick reply.
    I created a dynamic action with the following steps, but the dynamic action is not taking place.
    Event: After Refresh
    Selection Type: Region
    Region: Report 1 (my report name)
    Then in the true action
    Action: Execute Javascript SCode
    Code: showHighlight();
    I even tried to get an alert, but the dynamic action is not done at all. It seems the After refresh dynamic action is not working for a region.

  • LOV an SQL : how to configure a select list to get all records

    Hello,
    I am using Oracle 10g with APEX 2.0.
    Here is my question:
    I have a report and I am using 3 text fields and a select list to search through a join of two tables. The select list is composed of a "list of values" and the parameter, which is used in the SQL-sentence, has a numeric value.
    Result table after the join operation looks like this:
    Field1 Field2 Field3 Field4 (By assuming the field3 is the one which used in the select list.)
    21a this 1000 bn
    21a that 1001 vb
    33c thus 1012 ct
    What I want to do is to set another parameter-value pair in the select list to let user choose the "ALL" of the mentioned items in the select list so that the search will return all the records without having taken this select list-field into consideration.
    Is it possible to do it with LOV and SQL? Do I need any other functions? or configurations?
    Thanks in advance,
    Sedef

    Hi user630478!
    I always use a select list with submit and the option to get a NULL-Value for such things. To solve your problem do the following things:
    1.) Create two named LOVs. One as you already did and another one for all values.
    2.) Your select list with submit should be configured to show a NULL-Value e. g. it shows ALL with the value 0.
    3.) Create two conditional branches that work together with your select list. One that show the normal results if a user has clicked on a normal value and the second should act only if a user has clicked on ALL.
    4.) Write a process that switches the LOVs in your select list from one to the other. This process should only be fired if the second conditional branch has been actived.
    Maybe if I understood right that's what you want to know.
    yours sincerely

  • Associating a process with a 'select list with submit'

    Hi,
    In a tabular form I have 2 'select list with submit'. If a row is selected in the tabular form I need the following functionality from each of the select lists:
    Once a value is selected from the list a process will get excuted which will update a column of the checked row in the database table with the selected value from the list.
    My question is,
    1. How can I associate an 'after submit process' with the 'select list with submit'?
    2. Can I store the selected value in a variable which I can pass as an input parameter to a PL/SQL body?
    Regards,
    AM

    Hi,
    Please see my requirement below.
    I have a 'select list with submit' say P1_Select in a Tabular form Page. I want to create an after submit process (PL/SQL Process) which will take the selected value from the select list as input parameter and perform an update function for the checked row with that value.
    I'm trying give a feel the procedure:
    CREATE OR REPLACE procedure "P_REJECT"
    (p_message IN VARCHAR2 default Null)
    is
    begin
    FOR ii IN 1 .. APEX_APPLICATION.G_F01.count
    LOOP
    UPDATE NI SET NI.STATUS_NI = 'WCONF', NI.NI_Message = p_MESSAGE
    WHERE NI.NI_REF = APEX_APPLICATION.G_F01(APEX_APPLICATION.G_F01(ii));
    END LOOP;
    end;
    As suggested by Flavio I created the conditional 'after submit' process where I'm making a call to the above procedure.
    1. I am not sure how to pass the selected value as a parameter to the proc.
    2. 'request = value, where the value is the string literal P1_SELECT'.... Could not really figure out the meaning of string literal P1_SELECT
    Regards,
    AM

  • How to make a SELECT LIST READONLY

    Hi,
    I have a form to update the existing values in a table. Primary column is based on a Select List.
    So when user goto update screen they SHOULD NOT BE ABLE TO CHANGE the primary filed(means the value display in the Select List).
    SO to make this one I have make that select list read only. But not like other items even when we make select list read only it still allow user to change the value. So basically read only property not working for select text.
    There are many post in this regading same issue. Some of them recomended to make it disabled. But when we make a item disabled then when user POST that form, Apex not POST any disabled item values. Basically disabled items values not passing next form. So making item dissable also not a solution.
    I have read almost 20 post in here regarrding this and didnt get any solution for this. So please let me know if anyone knows how to make a select list read only (which is working same as read only text boxes, means that value pass when user POST the form).
    Thanks in advance...
    mc

    You define a function(this is based aorund jQuery selectors) in the page header like
    <script>
      var makereadonly = function(selector, makeReadonly) {
          $(selector).filter("select").each(function(i){
              var select = $(this);
              //remove any existing readonly handler
              if(this.readonlyFn) select.unbind("change", this.readonlyFn);
              if(this.readonlyIndex) this.readonlyIndex = null;
              if(makeReadonly) {
                  this.readonlyIndex = this.selectedIndex;
                  $(this).css('background-color','#CDCDCD'); //Adds a background colour to readonly item
                  this.readonlyFn = function(){
                      this.selectedIndex = this.readonlyIndex;
                  select.bind("change", this.readonlyFn);
          //For input items
          $(selector).filter("input,textarea").attr('readOnly','readOnly');
          $(selector).filter("input,textarea").css('background-color','#CDCDCD');
    </script>and apply it using a jQuery selector (call it in the "execute on page load" or any other JS code)
      makereadonly('#ITEMNAME1,#ITEMNAME2,#ITEMNAME3',true);Not that all of these methods(that act at the client side) will only prevent the user from modifying it 'normally', they could manipulate these readonly items using Javascript(or using firebug or any tool like that). So its better to make sure that your don't use the item value(from the page) for processing.

  • Smart scan not working with Insert Select statements

    We have observed that smart scan is not working with insert select statements but works when select statements are execute alone.
    Can you please help us to explain this behavior?

    There is a specific exadata forum - you would do better to post the question there: Exadata
    I can't give you a definitive answer, but it's possible that this is simply a known limitation similar to the way that "Create table as select" won't run the select statement the same way as the basic select if it involves a distributed query.
    Regards
    Jonathan Lewis

  • How to get Saved Selection list in javascript?

    Hello!
    Recently I met a little problem about save selection. I want to get saved selection list so that I can used in javascript. Now I have no ideals. Hope you tell me some useful information about how to get Saved Selection list in javascript!

    Mark is right, it's not possible.
    But do you know you can assign selection to a variable, and get back to it simply like this?
    var sel = app.selection;
    app.selection = null;
    /* your codes here
    app.selection = sel;

  • How to make a select list editable or searchable like the combobox

    Does anybody know, How to make a select list editable or searchable like the combobox? Do we need a plugin here, where I can get it.

    Hi Nilesh,
    If this is what you are looking for http://apex.oracle.com/pls/apex/f?p=32395:3:1202144397644679
    get the combobox plug-in
    http://www.apex-plugin.com/oracle-apex-plugins/item-plugin/searchable-combobox.html
    I have not tried this though. Found it while searching for some other plug-ins.
    Regards,
    -Senthil

  • How to set "Display as Text" field with AJAX select list

    thanks Denes for your posting. I'm trying to use the Denes Kubicek code to populate a "Display as Text" field. It works for Text Field (disabled), but not "Display as Text" field(saves state) . In my applciation I need to show this field only (not the disabled text box) when a select list value is changed. any ideas to modify the code below are appreciated.
    http://htmldb.oracle.com/pls/otn/f?p=31517:80:3418128396960418::NO
    here is the code from the url above
    1. Create an Application Process - getDet:
    DECLARE
    my_det VARCHAR2 (200);
    BEGIN
    SELECT ename || CHR(10) || job || CHR(10) || mgr
    INTO my_det
    FROM emp
    WHERE empno = :P80_EMPLOYEES;
    HTP.prn (my_det);
    END;
    2. Put the following in the Region Header of your page:
    <script language="JavaScript" type="text/javascript">
    function f_getDet ()
    var get = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=getDet',0);
    get.add('P80_EMPLOYEES',html_GetElement('P80_EMPLOYEES').value)
    gReturn = get.get();
    if(gReturn)
    {  html_GetElement('P80_DETAILS').value = gReturn  }
    else
    {  html_GetElement('P80_DETAILS').value = 'null'  }
    get = null;
    </script>
    3. Put the following in the HTML Form Element Attributes of :P80_EMPLOYEES:
    onChange="f_getDet()";

    Arie,
    this works fine on normal page, except page zero. I have the AJAX select list and "Display as Text" field on page zero. The "Display as Text" field doesn't show the the value when AJAX select is changed. I'm using similar code as used in my other APEX page on OTN site. I tired to display the gReturn value, just before calling "setDisplayOnlyNode" function in the code below and it's showing correct value, but fails to display the value in the APEX field on page zero. Any ideas are appreciated.
    Thanks,
    Surya
    <script language="JavaScript" type="text/javascript">
    function setDisplayOnlyNode(pItem, pValue)
    { var textNode = pItem + '_DISPLAY'; $x(textNode).innerText = pValue; }
    function f_getDet ()
    var get = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=getDet',0);
    get.add('P1_EMPLOYEES',html_GetElement('P1_EMPLOYEES').value)
    gReturn = get.get();
    if(gReturn)
    { setDisplayOnlyNode('P1_DETAILS',gReturn)}
    {  html_GetElement('P1_TEST').value = gReturn  }
    get = null;
    </script>

  • How to make dynamic select list with time interval of 15 minutes

    Dear all,
    I've a question. I need a select list that contains time with intervals of 15 minutes from 08:00 till 16:00.
    example 8:00
    8:15
    8:30
    8:45
    9:00
    9:15
    and so on till 16:00
    The values or stored in a varchar column.
    Can someone please help me with this one?
    Best regards,
    Caroline

    I think the easiest way would be to create a table "INTERVALS" with one row and column "INT_PERIOD"? per 15 minute period description
    8:00
    8:15
    16:00
    Then create your select list item based on a Dynamic List, or Query as
    SELECT int_period d, int_period r
    FROM INTERVALS
    ORDER BY INT_PERIODYou could write something to load the table, but that might take about as long to just edit in the values.
    Making it a Dynamic LOV, you then have it available anywhere else you might need it.
    Edited by: Bob37 on May 4, 2012 8:57 AM

  • How to use a select list value in a PL/SQL function body returning SQLquery

    Hi Friends,
    I have a select list P6_TEST with values 'nav' anf 'jyo'. I am trying to create a report using "SQL Query (PL/SQL
    function body returning SQL query)". In my report query can i check if P6_TEST='nav' and do something like the
    code shown below.How can i do that.
    DECLARE
    v_sql VARCHAR2(3000);
    BEGIN
    IF :P6_TEST = 'nav' THEN
    v_sql :=
    'SELECT
    * from department';
    ........................Thanks,
    Nav

    Nav:
    What you have should work. Give it a go. Post back if you run into issues.
    Varad

  • How to create Dynamic Selection List containg file names of a directory?

    Hi,
    I need a Selection List with a Dynamic List of Values containing all file names of a particular directory (can change through the time).
    Basically, I need an Iterator over all file names in a directory, which could be used for Selection List in a JSF form.
    This iterator has nothing to do with a database, but should get the names directly from the file system (java.io.File).
    Can anybody tell me how to create such an iterator/selection list?
    I am working with JDeveloper 10.1.3.2, JSF and Business Services.
    Thank you,
    Igor

    Create a class like this:
    package list;
    import java.io.File;
    public class fileList {
        public fileList() {
        public String[] listFiles(){
        File dir = new File("c:/temp");
        String[] files = dir.list();
        for (int i = 0; i < files.length; i++)  {
                System.out.println(files);
    return files;
    Right click to create a data control from it.
    Then you can drag the return value of the listFiles method to a page and drop as a table for example.
    Also note that the Content Repository data control in 10.1.3.2 has the file system as a possible data source.

  • How to make a select list to return value to numeric column?

    I do have a select list with static values (STATIC:01;0,02;1,03;2,04;3,05;4,06;5,07;6,08;7,09;8,10;9). The problem is that I am returning a value to a numeric column. Therefore I have set 'Post Calculation Computation' as "to_number(:P73_MRGRATING, 9);" however I am getting ORA-01722: invalid number. How, (or when and where) to properly convert a character from a select list representing a numeric value into column of NUMBER data type?
    Thank you for your time.
    DanieD

    Sergio,
    It is because I am not able convert a value in a page item (:P73_ID) to number. On a page before, I have assigned a value to an application item (APPL_ID). On page 73, I want to assign the value in APPL_ID to the page item P73_ID . The value assigned to APP_ID is numeric. On a page 73 I also have a computation in Page processing section. It is an 'After Submit' processing of a static assignment of application item APPL_ID to page item P73_ID. Unfortunately it does not work. (ORA-01722: invalid number). I have tested this also with a 'Post Calculation Computation' on page item P73_ID (to_number(:P73_ID, 9999999999);) and I am still getting ORA... error. Only way I can make it work is to create a page item P73_ID as a text field, then when I run page 73 and enter a value into P73_ID manually - then it works and I can save the values from the form into database...
    The strange thing is that I am using application item APPL_ID on a couple of pages, in where clauses and it always works, even when I am comparing APPL_ID against a numeric value like select * from a_table where some_number = :APPL_ID, this works. But when I would like to create an entry form and assign application item APPL_ID to the page item P73_ID that is referencing a numeric table column – then I am getting ORA-01722…
    Is there any application (sample application) that is doing this and it works so I can check it and learn how to create this process appropriately?
    Thank you for your time.
    DanielD

  • I would like to work with a selection of videos from my aperture library

    I recently switched from iPhoto to Aperture.  I did this in order to subdivide my iPhoto library, because it is now approaching 200 GB.  I have not yet divided it, but I like to make little video vignettes from certain events.  I used to be able to import just an event into iMovie, but now it seems to import my entire video library.  It takes 20 minutes just to load iMovie.  I don't want to see EVERY video in my library, I would like to see just the ones I have selected to work with.  How can I do this?
    --jenny

    Hi Michael,
    The HDD size is 499.25 GB.
    iTunes music is 422.44 GB. (The total listed on the actual iTunes program is 378.83)
    All My Files is 1.5 MB.
    Applications is 7.29 GB.
    Desktop is 1.18 GB.
    Documents is 1.18 GB.
    Downloads is 758.4 MB.
    Movies is 3.4 MB.
    Music is 424.7 GB.
    Pictures is 418.9 MB.
    My personal file is 429.54 GB.
    I don't have any video content on my iTunes.
    Is there something else I am missing?
    Thanks!

  • How working with mysql databse in javaFx?

    Please, I need work with mysql database. How make connection, and using statments etc.?

    Just like you were going to connect from a servlet or swing app.You can use the still same way.I provided a simple sample for that
    import javafx.stage.Stage;
    import javafx.scene.Scene;
    import javafx.scene.text.Text;
    import javafx.scene.text.Font;
    import java.sql.Connection;
    import java.sql.Statement;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.lang.ClassNotFoundException;
    import java.sql.DriverManager;
    import javafx.ext.swing.SwingList;
    import javafx.ext.swing.SwingListItem;
    import java.lang.Class;
    var items:SwingListItem[];
    var list:SwingList = SwingList{
    items: bind items;
    //Connection
    var con:Connection;
    //Statement
    var statement:Statement;
    //ResultSet
    var rs:ResultSet;
    try{
    Class.forName("com.mysql.jdbc.Driver");
    con=DriverManager.getConnection("jdbc:mysql://localhost/<database goes here>","<username goes here>", "<password goes here>");
    statement = con.createStatement();
    rs = statement.executeQuery("select * from <table goes here>");
    while(rs.next()){
    rs.getString(1);
    var item:SwingListItem = SwingListItem{
    text:"{rs.getString(2)},{rs.getString(3)}";
    //insert the swinglistitem into the SwingList
    insert item into items;
    rs.close();
    } catch(e:java.lang.Exception) {
    FX.println(e.getMessage());
    } finally {
    try {
    if(con != null)
    con.close();
    } catch(e:SQLException) {
    FX.println(e.getMessage());
    Stage {
    title: "Database Sample"
    width: 250
    height: 250
    scene: Scene {
    content: list
    }

Maybe you are looking for

  • Excise Reg at Depot

    Hi all, We have Excise REg no for Plant. But plant does not have Excise reg no. Material is shipped to Depot with excise invoice. What is the procedure at depot for GR. Do i need to capture the excise invoice?. From Depot, there is no excise invoice

  • Photoshop elements 9 not reproducing avi video in organizer

    Hello, I have read different posts of people having problems to reproduce video media in PE organizer with different degrees of succes to solve it. In my case, I have just updated a computer to windows 7 - 64bit and after installing Photoshop Element

  • Transfering music from I Pod to PC

    Hi Everyone!  Hoping I can get some help, here is what happened: I had a lap top and just got a new computer.  I thought all my songs were saved in the cloud or my i tunes account.  I logged into my i tunes in my new computer and it only had the purc

  • Links in Blog Summary Aren't Working

    Hi all: When I try to access any links on my Blog page I received error messages. Yet, when I try to access the same links on the post's page (after one clicks on "Read More") the links work well. you can check out my site at www.nathancushing.net to

  • Error loading QT/DivX 5 component

    In the console log I am seeing multiple errors of the type below but sent from Finder, Messenger, Loginwindow, Safari and iPhoto. Clearly I am missing a DivX component/plugin for QT but I can't find a copy of DivX that runs on a Powerbook G4 running