Dynamically update list of Val, based on another selection list?

4.2.1

Hello world

We have two LOVs. Both were static values. LOV1 has values static 1,2,3,4.  LOV2 has values static 10,20,30,40 and some texts. Now when the user selects 2 and 4 of LOV1, then LOV2 should display only 10 and 20.

I know there are waterfall LOV in 4.0 from, but I think that works very well for the table based LOV query? You are not sure if they can be used for static ones? Any help or suggestions on how to do it?

Thank you

Ryan

ryansun wrote:

4.2.1

Hello world

We have two LOVs. Both were static values. LOV1 has values static 1,2,3,4.  LOV2 has values static 10,20,30,40 and some texts. Now when the user selects 2 and 4 of LOV1, then LOV2 should display only 10 and 20.

I know there are waterfall LOV in 4.0 from, but I think that works very well for the table based LOV query? You are not sure if they can be used for static ones? Any help or suggestions on how to do it?

Use the built-in support in cascade LOV by converting the static LOVs for dynamic queries, including the relevant restrictions in the WHERE clause in LOV2:

LOV1

select '1' lov_label, '1' lov_value from dual
union all
select '2', '2' from dual
union all
select '3', '3' from dual
union all
select '4', '4' from dual

LOV2

select '10' lov_label, '10' lov_value from dual
union all
select '20', '20' from dual
union all
select '30', '30' from dual where :p1_lov1 not in ('2', '4')
union all
select '40', '40' from dual where :p1_lov1 not in ('2', '4')

Tags: Database

Similar Questions

  • Update of the table based on another

    Hello

    I'm trying to update a date column in a table based on another table. There is a unique ID in each table that identifies and connects each person:
    update patient_bu a set a.entry_date = (select b.entry_date from CLIENT_MED_DT b where a.id = b.id)
    This is the error:

    ORA-01427: einreihig subquery returns multiple rows


    The problem (I think) is that the select statement back several dates for records people. There are some people / records that have multiple entry dates, but I'm only interested in the most recent date.

    How can I update this table with only the most recent date?

    Thanks for any help,
    Matt

    Oh well, I forgot the UPDATE clause:

    SQL> create table patient_bu
      2  (id number
      3  ,entry_date date);
    
    Table created.
    
    SQL> create table client_met_dt
      2  (id number
      3  ,entry_date date);
    
    Table created.
    
    SQL> merge into patient_bu a
      2  using (select id
      3               ,max(entry_date) max_date
      4         from   client_met_dt
      5         group  by id
      6        ) b
      7  on    (a.id = b.id)
      8  when  matched then update
      9        set a.entry_date = b.max_date;
    
    0 rows merged.
    
  • Based on another selection LOV LOV

    Hello

    Apex Version: 4.2

    I struggled to get a LOV to be based on the selected value of an another LOV on the same page without submitting the page.

    For example. I have two LOV ' page.

    The first is a LOV region and the second is a LOV box.

    I want the list returned by the LOV area to include only the areas of the region which has been taken from the area of LOV.

    Is this possible without having to submit the page?

    I'd appreciate any help.

    Concerning

    Dominic

    Maguzzi wrote:

    Apex Version: 4.2

    I struggled to get a LOV to be based on the selected value of an another LOV on the same page without submitting the page.

    For example. I have two LOV ' page.

    The first is a LOV region and the second is a LOV box.

    I want the list returned by the LOV area to include only the areas of the region which has been taken from the area of LOV.

    Is this possible without having to submit the page?

    Integrated support in cascade LOV is addressed in the documentation.

  • How to use PL/SQL to create dynamic action to set the value of a selection by another list?

    Hello

    I would like to know how to use PL/SQL to create dynamic action to set the value of a list of selection by another selection list.

    1.PNG

    I wish can create dynamic action to manage the two above the Room select list (: P9_ROOM) and building (: P8_BUILDING).

    When you select "1074" in the bathroom, building highlights like "BRM BLD 5"

    When you select 'Area of the black box' in the room, building must assign the value "7 BLD BRM"

    When the room is Null, building should also be Null.

    I thank you,

    Alice

    I forgot to mention, for the PL/SQL Code, because you are working with items in the selection list, the return values are different from the display on your LOV values, you must instead use the return values.

    Thank you

    Erick

  • Display list items based on another element of the list

    Hi all

    I want to display the list item based on another element of the list, but his does not work.

    This is my code:


    / * WHEN-NEW-FORM-INSTANCE * /-his work.
    DECLARE

    rg_district recordgroup;

    rg_name VARCHAR2 (40): = "district";

    vtemp NUMBER;

    BEGIN

    rg_district: = FIND_GROUP (rg_name);

    IF ID_NULL (rg_district)

    THEN

    rg_district: =.

    CREATE_GROUP_FROM_QUERY (rg_name,

    'select dist, dist district_mas.

    );

    vtemp: = POPULATE_GROUP (rg_district);

    POPULATE_LIST ('BLOCK3.) Of RIDING ", rg_name);

    END IF;

    END;

    * / CHANGED AFTER a - list * /-does not work. Cannot complete the list based on the list

    DECLARE

    rg_branch recordgroup;

    rg_name1 VARCHAR2 (1000): = "branch";

    vtemp NUMBER;

    BEGIN

    rg_branch: = FIND_GROUP (rg_name1);

    IF this is ID_NULL (rg_branch)

    THEN

    DELETE_GROUP (rg_name1);

    rg_branch: =.

    CREATE_GROUP_FROM_QUERY

    ("rg_branch",

    "SELECT FROM dist_branch WHERE district IN branch (DIST DISTRICT_MAS WHERE DISTRICT = SELECT').

    || : BLOCK3. DISTRICT OF

    );

    vtemp: = POPULATE_GROUP (rg_branch);

    POPULATE_LIST ('BLOCK3.) Branch of THE ', rg_branch);

    END IF;

    END;

    Table:

    CREATE TABLE DISTRICT_MAS

    (

    DIST VARCHAR2 (100 CHAR)

    );

    CREATE TABLE DIST_BRANCH

    (

    NEIGHBORHOOD VARCHAR2 (100 CHAR),

    DIRECTORATE GENERAL OF THE VARCHAR2 (100 CHAR)

    );

    Values:

    insert into district_mas values ('chennai');

    insert into district_mas values ('coimbatore');

    insert into dist_branch values ('chennai', 'chennai_north');

    insert into dist_branch values ('coimbatore', 'Podanur');


    Concerning

    Nassik M

    I tested the code below when the list has changed


    DECLARE

    rg_branch recordgroup;

    rg_name1 VARCHAR2 (1000): = "branch";

    vtemp NUMBER;

    QT VARCHAR2 (10): = "';

    BEGIN

    rg_branch: = FIND_GROUP (rg_name1);

    IF this is ID_NULL (rg_branch)

    THEN

    DELETE_GROUP (rg_name1);

    END IF;

    rg_branch: =.

    CREATE_GROUP_FROM_QUERY

    (rg_name1,

    'SELECT branch, branch OF THE DISTRICT WHERE the dist_branch =' | QT | : BLOCK3. DISTRICT OF | QT);

    vtemp: = POPULATE_GROUP (rg_branch);

    POPULATE_LIST ('BLOCK3.) Branch of THE ', rg_branch);

    END;

    Hope it's work...

    Hamid

  • command update, based on another column column

    Col A, Col B, Col C
    1, a, null
    1, B, null
    2, a, null
    2, B, null
    3, bis, null
    3, B, null
    3, C, null

    How can I query this table to update Col C, with a command...

    Final outcome:
    Col A, Col B, Col C
    1, 1 A
    1 B, 2
    2, 1
    2, B, 2
    3, 1
    B, 2, 3
    3, C, 3

    Is it possible to update, only using SQL in oracle 10 g?

    You can use a correlated update statement if you are looking to update the data. It was not clear from your post.

    SQL> CREATE TABLE table_x
      2  ( col_a NUMBER
      3  , col_b VARCHAR2(1)
      4  , col_c NUMBER
      5  );
    
    Table created.
    
    SQL> INSERT INTO table_x VALUES(1,'A',NULL);
    
    1 row created.
    
    SQL> INSERT INTO table_x VALUES(1,'B',NULL);
    
    1 row created.
    
    SQL> INSERT INTO table_x VALUES(2,'A',NULL);
    
    1 row created.
    
    SQL> INSERT INTO table_x VALUES(2,'B',NULL);
    
    1 row created.
    
    SQL> INSERT INTO table_x VALUES(3,'A',NULL);
    
    1 row created.
    
    SQL> INSERT INTO table_x VALUES(3,'B',NULL);
    
    1 row created.
    
    SQL> INSERT INTO table_x VALUES(3,'C',NULL);
    
    1 row created.
    
    SQL> SELECT * FROM table_x ORDER BY 1,2;
    
                   COL_A C                COL_C
    -------------------- - --------------------
                       1 A
                       1 B
                       2 A
                       2 B
                       3 A
                       3 B
                       3 C
    
    7 rows selected.
    
    SQL> UPDATE table_x x1
      2  SET    col_c = (
      3                     SELECT rn
      4                     FROM
      5                     (
      6                        SELECT col_a
      7                             , col_b
      8                             , ROW_NUMBER() OVER (PARTITION BY col_a ORDER BY col_b) rn
      9                        FROM   table_x
     10                     )  x2
     11                     WHERE  x2.col_a = x1.col_a
     12                     AND    x2.col_b = x1.col_b
     13                 )
     14  ;
    
    7 rows updated.
    
    SQL> SELECT * FROM table_x ORDER BY 1,2;
    
                   COL_A C                COL_C
    -------------------- - --------------------
                       1 A                    1
                       1 B                    2
                       2 A                    1
                       2 B                    2
                       3 A                    1
                       3 B                    2
                       3 C                    3
    
    7 rows selected.
    
    SQL>
    
  • Display the value of the column automatically based on another column in a table

    Hello

    I use APEX 5.0, I have a requirement to display the field automatically based on the tabular presentation of other numbers.

    img.png

    in the screen shot attached above when I press Add button line a new line is created and enter the value in 'place no.', 'dept and identification of height place' when I press tab or get out of the column "height", "GID" should appear automatically.

    To display the GID my query will be like that. "Select GID from x where no = '1011' place and dept = 88 and height = 88'.

    How to get the value of from GID of the another value entered in Place no, dept and height in tabular form.

    Thanks in advance

    Ravi.

    Hi Ravi

    No need to point of Application or process. I just completed the task with the following steps

    (1) create 4 hidden items

    P2_SELWID

    P2_SELDEPTH

    P2_SELHEIGHT

    P2_CALCWNAME

    (2) gives 3 CSS classes in three columns of tables.

    . WID

    . DEPTH

    . HEIGHT

    (3) create the function jQuery for re - get three items from the page on a line if one of them has been changed.

    Add the following code to the function and the declaration of global variables

    function setRowItemValues(p_rownum){
        wid_col_id = 'f02_' + rownum ;
        wid_col_val = $('#'+wid_col_id).val();
        depth_col_id = 'f03_' + rownum ;
        depth_col_val = $('#'+depth_col_id).val();
        height_col_id = 'f04_' + rownum;
        height_col_val = $('#'+height_col_id).val();
        wname_col_id = 'f05_' + rownum;
        // set P2_SELWID,P2_SELDEPTH,P2_SELHEIGHT
        $s("P2_SELWID", wid_col_val );
        $s("P2_SELDEPTH", depth_col_val );
        $s("P2_SELHEIGHT", height_col_val );
        $s("P2_SELWNAMEID", wname_col_id );
        // Call the Dynamic Action to get WNAME if all values are not null
        if( wid_col_val != ''  && depth_col_val != '' && height_col_val != '' ){
            //Call DA to Get WNAME from WINT
            $.event.trigger("CalcWNAME");
            // set the Tabular form
            $('#'+wname_col_id).val($x("P2_CALCWNAME").value);
        }
    }
    

    and run when the Page loads

    $(document).on("change", ".WID,.DEPTH,.HEIGHT", function(){
        rownum = $(this).attr('id').substr(4);
        setRowItemValues(rownum);
    });
    

    (4) create a dynamic Action to get WNAME based on a PL/SQL function. Note the submitted page elements.

    CalcWNAME

    (5) set of the corresponding element in the line of the function jQuery, after completing the DA.

    Please check and I hope your problem is now solved.

    Concerning

    Mahmoud

  • change LOV based on another field value

    I have a need to change the LOV selection list element of a page based on the selection in the selection list on the page another element. In other words, for a page element that is a selection list, so I need to use a LOV normally and a different LOV if the value of a different page element is set to X.

    Dynamic action would be useful here (change where select list 1 = x), but I do not know how to take the measurements of the evolution of the LOVsfor select list 2 based on this action.

    Thanks in advance!

    John

    Assuming you are using apex 4.0 or later...

    Article P23_GEAR

  • Select P23_GEAR_TYPE as "LOV cascade.
  • Place the items P23_SEASON, P23_FIELDOFFICE as "Page Elements should send"
  • Put the SQL query

    select distinct gear_code d, gear_code r
    from gear_lk
    WHERE :P23_GEAR IS NULL OR :P23_GEAR != 'S'
    UNION
    select distinct gear_code d, gear_code r
    from season_gear_office_lk
    where season_code = :P23_SEASON
    and field_office_code = :P23_FIELDOFFICE
    and  :P23_GEAR = 'S'
    

    It will be useful.

    Kind regards
    Hari

  • Fill a combobox based on the selection of another

    Hi all

    I have a combobox that is filled dynamically. I want to fill an another combox based on the selected item in the combobox first. I use PHP to manage the connection to the database. The drop-down list box cbDivision fills very well.

    Can someone point me in the right direction?

    Here is my code:
    [Bindable]
    public var selectedItem:Object;

    [Bindable]
    private var datalist: ArrayCollection collection;
    private void resultHandler(event:ResultEvent):void {}
    DataList = event.result.data.row;
    }
    [Bindable]
    private var datalist2:ArrayCollection;
    private void resultHandler2(event:ResultEvent):void {}
    Datalist2 = event.result.data.row;
    }

    "" < mx:HTTPService url = " http://127.0.0.1/getDivisions.php"
    ID = "xmlGetDivisions".
    showBusyCursor = "true".
    result = "resultHandler (Event)" "
    method = 'GET' / >

    "" < mx:HTTPService url = " http://127.0.0.1/getFacilities.php"
    ID = "xmlGetFacilities".
    showBusyCursor = "true".
    result = "resultHandler2 (Event)" "
    method = "POST" >
    < mx:request xmlns = "" >
    < DivisionValue >
    {selectedItem.Division}
    < / DivisionValue >
    < / mx:request >
    < / mx:HTTPService >

    "< mx:ComboBox ="116"x ="60"id ="cbDivision"editable ="false"active = 'true' prompt = 'Please select' close ="selectedItem = ComboBox (event.target) .selectedItem, xmlGetFacilities.send ();"initialize =" getDivisions () "dataProvider ="{datalist}"= 'Division' labelField >
    < / mx:ComboBox >

    < mx:ComboBox = "413" x = "60" id = "cbFacility" editable = "false" enabled = "true" initialize = "xmlGetFacilities.send (); ' prompt = "Please sΘlectionner" dataProvider = "{datalist2}" labelField = "Name" > < / mx:ComboBox >


    Thank you in advance!

    No need to answer. I have it working now. It turns out that it was a problem with my PHP code.

  • Adding updates in SCCM update lists

    Hello

    I have a series of updated lists in SCCM, one for each type of customer, and I created deployments based on these lists and deadlines at the end of the week.

    I noticed that I left a particular update, I want to go out this week... If I add the update of the list update, this update install with deployments I have planned this week?  or would I need to reprogram a new deployment based on the updated list?

    Let me know

    Thank you

    Max

    How does this relate to the features of Windows Update?

    Tip: This is a forum for specific consumers. Try to post in the forums for it professionals in place => http://social.technet.microsoft.com/Forums/en/category/w7itpro, windowsvistaitpro, windowsxpitpro /

    On the other hand, you can find the Windows Server support in these forums: http://social.technet.microsoft.com/Forums/en/category/windowsserver

    Specific Windows Server security sub-forum: http://social.technet.microsoft.com/Forums/en-US/winserversecurity/threads

  • Updated list of endpoint at ISE

    Hello everyone,

    We have 1.4 ISE, sometimes I don't see ip address to the list of endpoint to endpoint when I select endpoint, I see the ip address to the report or I have two devices with the same IP (old and new points of termination), Mac addresses are different. How can I update list of endpoint?

    Kind regards...

    ISE maintains endpoint information based on the latest information he has given/collected for this endpoint. The endpoint information, for example the IP address, should be updated once him defrosting reconnects to the network. If the old device does not connect to the network again, ISE will keep the latest information known or purge feature (if the purge is activated).

    I hope this helps!

    Thank you for evaluating useful messages!

  • BC4J editable attribute based on another attribute

    Hello.

    Is it possible to define updatable (read-only) on BC4J, based on another column. For example if attribute a == true which attribute the (Always) b.setUpdatable of other b.setUpdatable (Never). By definition, changing Updatable property to EO/VO for each line is an absurdity. Or not?
    I know how to do it on ViewController (set ReadOnly property expression EL provided you attribute a different value) but don't know how to do (if it is possible) on model?

    THX

    Concerning
    Zmeda

    zmeda,

    You can override isAttributeUpdatable() on your EntityImpl or ViewRowImpl classes

    John

  • create dynamically a group of record based on previously entered record Grou

    Forms [32 bit] Version 10.1.2.3.0 (Production)

    Hello
    I know how to create dynamically record based on a query and put the code in when a new instance of the form.
    My request is. I have a form that includes several groups of Record and the user wants to dynamically create the following groups based on the previous groups.

    For example
    I have a record group with choosing a location.
    When the user selects the location from a list of values
    the 2nd record group called "Cost Centres" will have to filter only those whose locations selected above.

    How can I fill the 2nd record running when I don't know what site the user will choose?
    If I just simply fill in when new instance of form as the location and just select the entire document, populates the list of values.

    CC field is a LIST ELEMENT and the style of list is a LIST of POP, is not necessary.

    I put the code in the location of the trigger when-list-changed field.
    I get this error:
    FRM-41337: cannot complete the record group list

    Here is the code:

    DECLARE
    
    v_recsql Varchar2(1000); -- The SQL for creating the Record Group.
    v_recgrp RecordGroup; -- Record Group
    v_status Number; -- Return Value of Populate_Group function.
    c_where VARCHAR2(1000);
    
    BEGIN
         IF :location = '1' THEN
              c_where := ' substr(cost_centre,1,2) in (''01'',''02'')';
              
         ELSIF :location  = '2' THEN
              c_where := ' substr(cost_centre,1,2) in (''02'',''03'')';
              
         ELSIF :location   = '3' THEN
              c_where := ' substr(cost_centre,1,2) in (''01'',''11'',''07'')';
                   ELSE
              c_where :=  ' 1=1'; --EVERYTHING
    
         END IF;
    
    v_recsql := 'SELECT cost_centre, description  FROM   cost_centres  where '||c_where;
    
    
    -- Create the Record Group
    v_recgrp := CREATE_GROUP_FROM_QUERY('v_recgrp', v_recsql);
    
    
    IF NOT ID_NULL(v_recgrp)
    THEN -- No Error, record group has been successfully created.
    
    
    -- Populate Record Group
    v_status := POPULATE_GROUP('v_recgrp');
    
    
    IF v_status = 0 
    THEN -- No Error. Record Group has been Populated. 
    POPULATE_LIST('block.CC', 'v_recgrp');
    END IF; -- IF v_status = 0 
    
    -- Delete the Record Group as it is no longer needed.
    DELETE_GROUP('v_recgrp'); 
    
    
    END IF; -- IF NOT ID_NULL(v_recgrp)
    
    END;
    Thanks for your help.

    Hello
    Once registration State Gets the change to block you cannot fill/repopulate the list item. Keep these list items as element non-base of data with different names and create different items such as database Moose points. That assign values in triggering WHEN-LIST-CHANGE for real database items.

    -Clément

  • Dynamic action - set a value of element based on the selection of lines of report

    Hi people,

    Does anyone have an example how to set up a dynamic action, which could fill an element with the selected ID based on the selection of line of the report on the same page?

    Demo:
    http://Apex.Oracle.com/pls/Apex/f?p=19543:2

    If I select an item in the report, then I would fill in 'Selected ID' element with the value of the selected report EMPNO line.


    Later, I would use it for the display of parts of master / detail on the same page.

    Thank you very much
    Tomas

    For this sample page, add the following JS code to run when the page is loaded.

    $('.highlight-row td').click( function(){
      //fetch record id from the cell contents of first column in row
      id = $(this).parent().children('td:eq(0)').text();
      //set page item to selected id
      $('#P2_SELECTED_ROW').val(id);
    });
    
  • loop chart - the chart is based on another query

    I'm working on a report of BI Publisher. The report displays information for a list of stores (store group, by store - each store page break is a page). Now, we want to add a chart (weekly sales - group per week) for each store, we know there is "table within the group" box, we can use, but our problem is that the chart is based on another query, not the original group by query parent store. Could you please help? Detailed information can be provided if required.

    Please check your Inbox.
    I sent you the answer.

    See you soon

    Jorge
    p.s if this answers your question please give the points and close the message

Maybe you are looking for