second list according to first on when-list-changed

Hello!
I am having trouble with 2 poplists. First PoPList (: bloc_portar.lista) is generated ok. PoPList second (: bloc_portar.cnp) depends on the values of the first like this:

DECLARE
nume_lista1 varchar2 (60): = replace (: bloc_portar.lista, ' ', NULL);
nume_lista2 varchar2 (60);
rg_query_cnp varchar2 (1000): = ' SELECT b.id, b.id vizitatori2 b
WHERE b.nume = nume_lista2';

rg_id_cnp recordgroup;
rg_id2 recordgroup;
err_cnp NUMBER: = 0;
BEGIN
nume_lista2: = substr (nume_lista1, 1, 7);
message ('-' | nume_lista2 |) '---');

rg_id2: = Find_Group ("rg2");
If not ID_NULL (rg_id2) then
delete_group (rg_id2);
end if;

rg_id_cnp: = create_group_from_query ('rg2', rg_query_cnp);
err_cnp: = populate_group (rg_id_cnp);
clear_list ('bloc_portar.cnp');
populate_list ('bloc_portar.cnp', rg_id_cnp);
END;

nume_lista1 retrieves the data selected from the first poplist, and nume_lista2 takes the first 7 letters of this string to pass in the query which is expected to group/fill the second list. This code is more of a review and not a final code that is why I used the string functions (and also because the values in the first list are concatenated (name + first name).
I used a message to ensure that the value of nume_lista2 is the one I want for the query to work.

The problem: its in here 'SELECT b.id, b.id vizitatori2 b WHERE b.nume = nume_lista2 ";
I discovered that when I pass the condition WHERE "manually" as this "SELECT b.id, b b.nume vizitatori2 b.id = WHERE"James";
the second poplist is filled very well with the right values. But when I try to use the nume_lista2 variable in the condition it is said that rg2 (aka the group for the second poplist) "cannot create the rg2 group.

Hope you can help me,
Iulian

Hello

That's the problem with your query of record group. You do not pass the variable to the query.

"SELECT b.id, b.id vizitatori2 b WHERE b.nume = nume_lista2";

Is taken as it is. Try to run such query (without change of nume_lista2). It will give you the error and this is the reason why your record group is not be filled.

Thus, you should modify the logic of

DECLARE
nume_lista1 varchar2(60) := replace(:bloc_portar.lista, ' ', NULL);
nume_lista2 varchar2(60);
rg_query_cnp varchar2(1000);

rg_id_cnp recordgroup;
rg_id2 recordgroup;
err_cnp NUMBER:= 0;
BEGIN
nume_lista2 := substr(nume_lista1, 1, 7);
message('---' || nume_lista2 || '---');
rg_query_cnp := 'SELECT b.id, b.id FROM vizitatori2 b WHERE b.nume='''|| nume_lista2||'''';

rg_id2 := Find_Group ('rg2');
if not ID_NULL(rg_id2) then
delete_group(rg_id2);
end if;

rg_id_cnp := create_group_from_query('rg2',rg_query_cnp);
err_cnp := populate_group(rg_id_cnp);
clear_list('bloc_portar.cnp');
populate_list('bloc_portar.cnp',rg_id_cnp);
END;

Arun-

Tags: Oracle Development

Similar Questions

  • How to load the second list meter if I have something in the first list of select/focus?

    How to load the second list meter if I have something in the first list of select/focus?

    public class spintest extends BaseScreen implements {FocusChangeListener}

    final String [stateList] = {"New York", "Washington"};
    final String [] NYcities = {'Manhattan', 'Queens', 'Brooklyn', 'Bronx'};
    final String [] WashCities = {"Redmond", "Kent", "Seattle", "Bellevue"};

    public SpinTest() {}
    SpinBoxFieldManager spinBoxMgr = new SpinBoxFieldManager();

    SpinBoxField spinBoxStates = new TextSpinBoxField (stateList);
    spinBoxStates.setFocusListener (this);

    SpinBoxField spinBoxCities = new TextSpinBoxField (NYcities);

    spinBoxMgr.add (spinBoxStates);
    spinBoxMgr.add (spinBoxCities);

    Add (spinBoxMgr);
    }

    ' Public Sub focusChanged (field field, int context) {}
    If (spinBoxStates == field) {}
    Salt string = (String) spinBoxStates.get (spinBoxStates.getSelectedIndex ());
    If (sel.equals ("New York")) {}

    I have to load all the cities of New York in the second wheel if I select 'New York' in the first wheel

    }
    else {if (sel.equals ("Washington"))

    I have to load all the cities of Washington in the second wheel if I select 'Washington' in the first wheel

    }

    }

    Simply call the TextSpinBoxField.setChoices method, transmitting your new list of choices.

  • populating list when another list changed

    Hi all

    I have two list items,

    What happens is,

    When I change the value of "list1", "list2" must be filled.

    It works when I wrote my code in a key, but does not when I wrote it in a trigger when-list-changed?

    Why?

    This is the code that I was testing, I wrote "SAU" only to the objective test, but I'll replace it with the name of the element

    DECLARE 
        X RECORDGROUP ; 
        n number ; 
    BEGIN 
        X := FIND_GROUP('TMP') ; 
    IF NOT ID_NULL(X) 
        THEN 
        DELETE_GROUP('TMP') ; 
        END IF ; 
        X := CREATE_GROUP_FROM_QUERY('TMP','select t.description d,t.User_Code c
    from codes_master t,codes_master c where t.sub_code_no =c.code_no 
    AND t.code_type = 33 
    and c.code_type =30 
    and c.user_code=  ''SAU''' ) ;
    n := populate_group('tmp') ; 
    POPULATE_LIST('CITY','TMP') ;
    
    END ; 
    
    

    Thank you

    Suppose you have a block with an existing record

    COUNTRY CITY

    Germany Berlin

    You have a listitem with the country and a second dependent with the cities in the selected country listitem.

    Now suppose you enter a second record and choose "Italy" in the new country. When you use a dependent list for cities, this list would now need to be filled with other values, and so the existing listitem entries would be removed. But the same listitem is used in all records in the block. So, if would remove the "Berlin" in the list entry, what should happen to the value in the first record? It would have to matching entry in the list more. And it does not work.

    Thus, dependent lists jobs only for record Uniblock, or to be independent on the number of records, use of lov for this scenario.

  • How to get the checkbox value when value list changed in the classic report

    Hello
    I worked with apex 4.2 and I create normal classic report with a checkbox column and a single column change to select list (named loved) now, when I want change to user list
    take the value of the checkbox element and display it in the message.

    SQL for the report

    {
    SELECT
    "" "< INPUT TYPE ="checkbox"NAME ="f01"VALUE =" "
    || SEQ
    |'">"SEQ, "
    ID,
    DEPT_NO,
    EMP_NAME} I change the column attributes of Dept_NO to display as the selection of the name of the Department (named lov) list.

    now, I want when change of user name of the Department, the value of the MESSAGE ALERT SHOW IN SEQ

    I create JavaScript on the page

    function test (pThis) {}
    var f01_value = $('select[name="f01"]').value;

    Alert ("#SEQ:" + f01_value);

    }
    < /script >
    I call this javascript function when the change in the list, but the value undefined...

    My Question:

    How can get this value or any value of the point in reports

    concerning
    Ahmed

    Hello
    Check your page now.

    As mentioned earlier, you must use APEX_ITEM. CHECKBOX2.

    APEX_ITEM.CHECKBOX2(2,EMP.EMPNO,null,null,null,'f02_'||lpad(ROWNUM,4,'0')) NO,
    

    And the javascript function will be

    
    

    You cannot use $v to get the value of the checkbox element such that it works differently for the boxes, see http://docs.oracle.com/cd/E37097_01/doc/doc.42/e35127/javascript_api.htm #BGBGDGIH.
    Therefore, you use the jQuery val().

    See you soon,.

  • How do I disable a text field or select list when I change record.

    Dear Sir.

    I created the form with the report when I insert the new record, then all ground are able to insert the value in the table.

    Here I want to when I change any folder, then a field as a TEXTFIELD or select list, which I should be disabled in the case of a CHANGE.



    How do I disable a text field or select list when I change record.



    Thank you

    CORINE

    Hello

    Edit the element... There is a Readonly tab... Enter the condition for readonly... for example... Suppose you have a hidden field P1_X for the primary key. To add the new record, this field will be null and for editting p1_x will have the primary key value...

    So you can make the condition as P1_X readonly IS not null...

    Kind regards
    Shijesh

  • How to create the trigger WHEN-LIST-CHANGED to the text at the level of the item element

    Hi all
    I have a requirement that is to say that I developed on the form that contains an emp (empno, sal, job) details in the field of the form.job table (text element) contains lov. My requirement is when I select values in the lov it must create a new record in this tabular form. I did ' t get trigger WHEN-LIST-CHANGED at the level of the element for the work of i.e text point.

    I tried this requirement by making the point of work as working fine.i of an item.it list used NEXT-ITEM KEY also to make the this.but is not our business requirements.

    When lov changes he needs to create a new line.

    How we do that. Can someone give me an idea please

    Thank you

    Hello
    In the text element, you can use trigger KEY-LISTVAL and try to use the code as...

    LIST_VALUES;
    IF :FORM.ITEM_NAME IS NOT NULL THEN
      CREATE_RECORD;
    END IF;
    

    When list change trigger only for the LIST_ITEMS and fires when you try to change the list_item

    -Clément

  • Drop-down menu horizontal list - change how to open the Sub Menu entry

    Hi all

    Thank you in advance for your time and your help and please excuse my English, this is not my mother language.

    I have a little problem with the list of the menu drop down, I use it instead of the tabs to navigate through my application and now I have users who want a larger arrow / select the field to open the menu void entries. I did a screen capture to make things more clear, but it seems that im not allowed to attach photos to this post.

    The problem is, you have to click on the small arrow - no area is valid to open the submenu and I do not see the possibility to increase the arrow or use a larger space.

    I googled already for a long time but could not find anything specific on the change of this arrow. He could only do a little bigger, or all simply to use the whole of the area to the right of the label in the list drop down Parent (which is a link itself).

    I hope you can provide some ideas how to handle this problem.

    Best regards

    Christian

    Edit: We use: Application Express 4.2.3.00.08

    Hello

    I think that the image does not come from CSS file.

    I can see the source HTML of this image is defined by the img tag.

    Then you should be able to change when you change the list template

    13.2 customization of models

    13.2.10 models list

    Kind regards
    Jari

  • The drop-down list changes color with background option selected

    Hello!

    I m stuck with this drop-down menu that I need to have a red background, if the TBD option is active (which is the default) and have no backgrond if no other option is selected.

    drop01.png

    drop02.png

    drop03.png

    The red background is a red rectangle that is visible or hidden, I have all code in the event of modification of the drop-down list:

    if (this.rawValue == "TBD"){
        RectangleRed2.presence = "visible";
    }else{
        RectangleRed2.presence = "hidden";
    }
    

    But the thing is that the event checks the value when is changed, so if I'm in the value of TBD and I selected point 1, the recntagle is still visible, because at the moment, I have chosen point 1 value was to be determined, so does not in the way I need to.

    Anys ideas?

    Thank you!

    You must use

    if (xfa.event.newText == "TBD"){
    ...
    

    Then it works fine.

    "xfa.event.newText" evaluates to dropdown in the runtime.

    Hope it is useful,

    Mandy

  • See the second LOV after submit first LOV without ajax

    Dear,
    How to display a second LOV populated after the sending of the first LOV without using ajax.
    Please could someone help me.

    THX.
    Celio

    Published by: Celio on 15-Sep-2009 22:33

    Hello

    Yes, I had the same problem. Make a calculation.

    Item name: LOV2
    Type: SQL expression
    Point calculation: After submit
    Computing: NULL VALUE

    Conditions
    Condition of type: Request = Expression 1
    Expression 1: LOV1

    This means that when you change the value of the LOV1 and LOV2 returns null.

    Mike

  • The second image lost in CAN communication when use card NI PCI-CAN/XS2

    I recently had a problem on CAN communication.

    I need commmunicate a Cluster with CAN BUS, baud rate is 500 Kbps, the BOX is card NI PCI-CAN/XS2. The operating system is Windows XP.

    normally, the PC send a Cluster command, then reread a frame of data of the Cluster, but for some controls, the Cluster will return two data frames, and the program on PC cannot receive the second frame, he lost.

    I searched the forum, most of her results is the overflow of CAN BUS error, which make the CAN setting lost, but there is not an error on my program report and baud rate is not that fast, I also use another port of the NI PCI-CAN/XS2 to monitor the bus CAN, the second frame of data never appear When I can replace NI CAN map vector CanCaseXL (CAN card) and call of CanCaseXL DLLS in labVIEW, it can get the second CAN fit, the vector CanCaseXL monitor can get the second image data also.

    Yes, is there a software/hardware configuration must be done to get the second block of data?

    the attached photos are NOR-CAN/vector ALLOWS to follow and CAN init/write & read in my program.

    Any reply is appreciate! Thank you

    Hello iwantofly014,

    I don't know that the framework is not lost.

    Could you post your code?  In particular the data Get VI?

    Also, can you make an indicator of the output of the ncReadNetMult?

    It seems you are trying to implement the UDS and KWP2000 Protocol.  Is this possible?  We have a product that already implements these two protocols and really simplify this type of application.  Its called the Automotive Diagnostic command set.

    Have a great day.

  • Windows Vista stops working in iTunes as soon as he plays the first track when importing from CD (APPCRASH). Help!

    Windows Vista has stopped working error back in iTunes as soon as it reads in the first track when importing CD and must close the program (APPCRASH). I uninstalled and reinstalled a newer version of iTunes (currently empty) several times. Also, ran the CD diagnostics in iTunes and seems OK. I'm on Vista Home Premium Edition. If it helps, I saved the CD Diagnostics in ITunes and the Windows APPCRASH info. I spend several hours of research and try to understand it. Any ideas?

    Thank you for your response. I actually solved this suddenly. I've had my laptop plugged into a port replicator to access devices. I decided to try to unplug, restart and try again. It worked! Do not know why the replicator program caused crash but it seems to work...

  • first freezes when you import a layered photoshop file

    When I try to import a PSD with more then 1 layer import window opens but I'm making progress and the Cancel button is grayed.

    I tried to edit the files stored with 8-bit CMYK to RGB.

    I also did the tour where you are looking for in the media browser dubbel click it and make drag the file in the project, which works but it flattens the image and I need the different layers.

    When I have 1 layer the psd and no transparent whats if ever it works too.

    But I need to make images move so I need different layers of work anyone can help me with this?

    Thanks

    1. the photoshop files must always be RGB and CMYK never.

    2. sometimes when importing Photoshop files, the menu to choose the layers is off the screen. You know this if when importing and the first seems to freeze on import, press enter and you might get the photoshop file, but with all the merged layers. To choose the layers, reduce the size of the first screen when it is open before you import Photoshop, then try to import the photoshop file and you should see the submenu for choosing diapers. This may or may not be your problem, but it is one from time to time, I found.

  • I me creative cloud of subscribed to, but can't seem to download first adobe, when I click 'download' invisible Rev on another page, on which it is registered "downloading" but nothing will download really.

    I me creative cloud of subscribed to, but can't seem to download first adobe, when I click 'download' invisible Rev on another page, on which it is registered "downloading" but nothing will download really.

    Download the desktop cc app and install it from there, Download Adobe Creative Cloud apps | CC free trial Adobe

    If you have bad dl'g, use another browser.

  • I can't download first pro when I bought just cloud adobe - why!

    I can't download first pro when I bought just cloud adobe - why! What should I do?

    Hi Helllpp,

    It is usually because you do not have a 64 bit OS. Update your operating system to 64-bit and you will download all video applications.

    Thank you

    Kevin

  • Hi, I work with the standard of the CS6 for Mac, Adobe, I bought a DVD with the software. I already installed on my mac book. Soon, I want to buy a second computer for my work. When I bought the software told me that it is possible to install the

    Hi, I work with the standard of the CS6 for Mac, Adobe, I bought a DVD with the software. I already installed on my mac book. Soon, I want to buy a second computer for my work. When I purchased the software, I was told that it is possible to install the software on a second computer. But I also read lately that I will be allowed to work with a computer. I want to work on both of my computers without or install and / activation of the software every time. Is this possible? Thank you!!

    @

    You should be able to install the product on two computers as long as they are running at the same. The platform should also be Mac

    You can download the product of

    Download the CS6 products

Maybe you are looking for

  • Cannot install internet driver on HP Compaq

    I have a refurbished HP Compaq Windows XP for refurbished computers.  I had the computer stored for about 8 months and then set up again.  When I plugged my adapter Netgear (WNA1100) it wouldn't work, so I uninstalled the driver.  Then I went to the

  • How to check if an Excel Application is open, and if so to close before running a labview VI

    Hi all I have a VI that takes measures and store them in one worksheet Excel after a few digital manipulations. I was very careful to close whatever it is in the correct order before making a "Quit Application" at the end of the Labview VI The VI wor

  • Application of building without distribution polymorphic VIs

    Hi all We are currently deploy several LabVIEW applications that use polymorphic screws I have no problem, these applications (apart from a known issue with LV8.6.1 and bad dsoffset error - so we use LV2010 for this application) of the building. My p

  • Constantly go to page alignment

    HP 8500 constantly go to align the page. I cancel and it will be printed and go right back to the alignment page.

  • Keyboard Bluetooth pairing code problems

    I have a keyboard microsoft bluetooth keyboard 6000, after getting a blue screen that I lost the connection with the keyboard, when I try to associate the keyboard of my computer, the computer detects the keyboard, but as I go to the next screen, it