This discussion is archived
8 Replies Latest reply: Sep 13, 2007 12:42 AM by 233480 RSS

Dependent Dynamic LOV lists in a table format

233480 Newbie
Currently Being Moderated
I have a screen where the user can enter multiple rows into a tabular layout.

Three columns have LOV's where the selection in the first LOV should restrict the list in the Second LOV which will restrict the list in the third LOV. I think I could manage it if it were a single row of data being captured, but how does one reference the previous fields selection in the next field when using multiple table rows.

I have a db table which I think can drive the process, but I'm not familiar with the method in which to handle it.

Table: id, LOV-1 -value, LOV-2 value, LOV-3 value

So when user selects from LOV-1, only those LOV-2 values associated with LOV-1 that the user selected should be listed. And then LOV-3 values associated with LOV-2 selection should only be listed.

Can someone offer some insight or point me to an example?

Thanks
Tony
  • 1. Re: Dependent Dynamic LOV lists in a table format
    233480 Newbie
    Currently Being Moderated
    Has anyone been able to implement a series of dependent LOV's in a tabular report which is updateable?

    I have a collection which I update 'onchange' if an LOV column is updated to retain the new value. I still have the issue of referencing the 'correct rows' previous LOV value to limit the next LOV's selection list.

    Any suggestions on how to reference the previous column's value for the current row?

    Desired process flow:
    1 .user selects value 2 from LOV 1 [row 1]
    -onchange, trigger submit of form back to itself updating the collection.
    2. provide LOV 2 [row 1] with limited list of values based on selection in LOV 1 [row 1]
    -onchange, trigger submit of form back to itself updating the collection with values of
    row 1's LOV 1 and LOV 2
    3. provide LOV 3 [row 1] with limited list of values based on selection in row 1's LOV 1 and LOV 2

    Is there away to change the dependent list of values using a javascript function? Such as repopulate the LOV?

    Help?
    Tony

    Message was edited by:
    amalloy
  • 2. Re: Dependent Dynamic LOV lists in a table format
    135285 Oracle ACE
    Currently Being Moderated
    Tony,

    have you tried Vikas example at http://apex.oracle.com/pls/otn/f?p=24317:9 ?

    Maybe that's what you are looking for.

    Patrick
    ----------------------------------------------------------------------------------------------------
    My APEX Blog: http://inside-apex.blogspot.com
    The ApexLib Framework: http://apexlib.sourceforge.net
    The APEX Builder Plugin: http://sourceforge.net/projects/apexplugin/
  • 3. Re: Dependent Dynamic LOV lists in a table format
    233480 Newbie
    Currently Being Moderated
    Patrick,
    Yes, that is the functionality I'm looking for.

    I downloaded the app and tried to import, but I'm getting an incompatible type error stating that some commands are not recognized. (my apex version is 2.2)

    Is there a write up or some notes on how this is working that you know of?

    Thanks for the link.
    Tony

    Message was edited by:
    amalloy
  • 4. Re: Dependent Dynamic LOV lists in a table format
    135285 Oracle ACE
    Currently Being Moderated
    Hi Amalloy,

    try the "Download this application (as of 3/30/2007)" link, it should include the "Tabular Form - Cascading LOV" page because it was last edited 11 months ago.

    Patrick
    ----------------------------------------------------------------------------------------------------
    My APEX Blog: http://inside-apex.blogspot.com
    The ApexLib Framework: http://apexlib.sourceforge.net
    The APEX Builder Plugin: http://sourceforge.net/projects/apexplugin/
  • 5. Re: Dependent Dynamic LOV lists in a table format
    233480 Newbie
    Currently Being Moderated
    Patrick,
    Thank you.

    I did download it and uploaded it into a APEX 3 environment, but I have some additional questions now.
    I can see the backend of the screen, but the import did not have the schema for the table nor the data, so running it has a 'no table or view' exists error.

    I see the onchange statement which is on the first LOV driving the others has an AJAX reference. I have not worked with AJAX before and I'm new to Javascript to boot, so am I in for a steep learning curve with trying to follow this? I can't seem to find the js file where this function or call code is. Any thoughts.

    Thanks
    Tony
  • 6. Re: Dependent Dynamic LOV lists in a table format
    233480 Newbie
    Currently Being Moderated
    Patrick,
    I did find the javascript and related code in the header / footer of the page and shared processes of the application.

    I just need to try and configure it into my application if possible. This will be "extremely" useful once I can get it implemented.

    Thanks
    Tony
  • 7. Re: Dependent Dynamic LOV lists in a table format
    135285 Oracle ACE
    Currently Being Moderated
    Hi Tony,

    go to the "Region Definition", you will find the code in the "Region Header" and "Region Footer" property.

    Patrick
    ----------------------------------------------------------------------------------------------------
    My APEX Blog: http://inside-apex.blogspot.com
    The ApexLib Framework: http://apexlib.sourceforge.net
    The APEX Builder Plugin: http://sourceforge.net/projects/apexplugin/
  • 8. Re: Dependent Dynamic LOV lists in a table format
    233480 Newbie
    Currently Being Moderated
    Patrick,
    I have it working.

    When initially displaying existing records in the table, the dependent LOV's do not filter. That is in IE. Firefox on the other hand processes them correctly on the initial display.

    Not sure what is going on seeing as how Vikas has the 'fire-onchange' trigger in the footer of the region.

    Thanks
    Tony