Forum Stats

  • 3,770,027 Users
  • 2,253,050 Discussions
  • 7,875,270 Comments

Discussions

Limitation in using model driven LOV

Aravindan__V
Aravindan__V Member Posts: 4 Red Ribbon
edited Mar 21, 2019 1:58AM in JDeveloper and ADF

Hi all,

  When we use model driven LOV, we create List of values to a view attribute. This list of values is a SQL query based View object in itself. The below example will show the limitation we are facing.

  1. An EO based view object EmployeesVO is created.(Attributes Title, FirstName, LastName)

  2. The attribute Title is defined a List of Values to it and set the list type as choice list.

  3. This list of values is a query on some table, eg: lookup_values where lookup_type = 'TITLE' and enabled_flag = 'Y'

  4. When creating a Table UI with this set-up, the title field shows the list of values of all values from lookup_values where lookup_type = 'TITLE' and enabled_flag = 'Y'.

  5. lets assume an employee record is created with title as "Dr", which is a value from the choice list.

  6. I am updating the value of "Dr" in lookup_values, column enabled_flag = 'N'. (this will filter the record from the list of values, as it expects that enabled_flag should be 'Y')

  The expectation is that this value should not be displayed in the list of values for all records that I want to create in future.

  But what happens when I query the already created employee records with Title as "Dr", is that those records do not show the Title value "Dr". I guess since the value is filtered by the List of values query, it will not be shown on the already created employees as well.

Since this is a common requirement (ie, user would not want some value to be not available to pick from a list, however would still want to see that value for records which were already created), my questions are,

1. is this how the framework is supposed to behave, or am I doing something wrong in using this functionality?

2. is there any work-around for this? (to filter a value from LOV, yet still show that value for records that were already created.)

let me know if any more information is required to clarify.

thanks

Aravindan

Tagged:

Best Answer

  • Timo Hahn
    Timo Hahn Senior Principal Technical Consultant - Oracle ACE Director Member, Moderator Posts: 37,669 Red Diamond
    edited Oct 25, 2018 3:31AM Accepted Answer

    Aravindan, tell us your jdev version, please!

    The problem is the definition of the LOV. It states (somewhere) that only values which are part of the list can be selected (or shown) as value. If you use the same LOV to display the already present data and to enter new rows, this constraint works on both, old and new rows. So, this is not a limitation but how it is supposed to work per definition.

    To make it work, use different LOV for old rows where you allow all title records and to create a new row where you only allow titles with enabled=true.

    Timo

Answers

  • Timo Hahn
    Timo Hahn Senior Principal Technical Consultant - Oracle ACE Director Member, Moderator Posts: 37,669 Red Diamond
    edited Oct 25, 2018 3:31AM Accepted Answer

    Aravindan, tell us your jdev version, please!

    The problem is the definition of the LOV. It states (somewhere) that only values which are part of the list can be selected (or shown) as value. If you use the same LOV to display the already present data and to enter new rows, this constraint works on both, old and new rows. So, this is not a limitation but how it is supposed to work per definition.

    To make it work, use different LOV for old rows where you allow all title records and to create a new row where you only allow titles with enabled=true.

    Timo