Forum Stats

  • 3,875,419 Users
  • 2,266,914 Discussions
  • 7,912,203 Comments

Discussions

select lov display value based on lov name in the same table

abdo208
abdo208 Member Posts: 10 Red Ribbon

Hello,

I'm using Oracle Apex last edition and I'm wondering if the following is possible!


I have an interactive grid table with two columns... The first column is showing some of LOV that is stored in Shared Documents: List of Values using this query :

select    LIST_OF_VALUES_NAME from apex_application_lovs;

In the second column, I want a select list type column to list all the "display values" based on the Lov name on the other column.

Is that possible?

Thanks

Tagged:

Answers

  • InoL
    InoL Member Posts: 10,214 Blue Diamond

    This sounds like you think you have a solution to a problem, but we don't know what problem you are trying to solve here. Can you explain the problem you are trying to solve?

    Most dynamic LOV problems can be solved by creating an LOV of type Function returning SQL.

  • abdo208
    abdo208 Member Posts: 10 Red Ribbon

    There is no problem ... I will try to explain my question more.

    I have an interactive grid table with 2 coumns.

    First column are showing all the lov stored in Shared Documents.

    I want the second column to show the first column lov display values based on the first column lov name.

    Is it clear now?

    Thanks

  • InoL
    InoL Member Posts: 10,214 Blue Diamond

    Instead of "problem" let me rephrase it to: what business requirement are you trying to solve?

    I cannot imagine a requirement where you can select totally (possibly hundreds of) unrelated Shared Component LOVs in one IG.

    I want the second column to show the first column lov display values based on the first column lov name.

    That is still a bit unclear to me. Can you give an example? Do you mean something like:

    1st column: select LOV_COUNTRIES, then in the 2nd column: show all countries in LOV_COUNTRIES

    or

    1st column: select LOV_ORDERS, then in the 2nd column: show all orders in LOV_ORDERS

    What would be the business requirement to show either a full list of countries or a full list of orders in one and the same IG column? To what column in the base table of the IG would you map this?

    I'm trying to understand what you are trying to achieve, and possibly come up with a better solution.


    Note that LOVs can have more than one display column, so you may quickly run into problems. This is a valid LOV:

    select ename, empno, sal
    from emp
    


  • abdo208
    abdo208 Member Posts: 10 Red Ribbon

    Thank you @InoL 


    Let me describe my business requirements.


    I have a configuration page only for admin .. the admin has some of the shared documents LOV .. let's say he picks 6 lov and stores them in a table.


    Now. in an interactive report I'm showing those 6 lov Names and I want in the second columns the lov name Display value (as you mentioned First option).


    Basically we are creating a business profile and the normal user should choose some values based on if he is interested in it or not.