oracle11goracle-apextabular-form

How to Access a Column Value in a Select List within a Tabular Form for Each Row in Oracle APEX


Within a tabular form using the following sample query, i.e.:

select  
"EMPNO",  
"EMPNO" EMPNO_DISPLAY,  
"ENAME",  
"HIREDATE",  
"SAL",  
"DEPTNO",  
"MY_LOV"  
from"#OWNER#"."EMP" 

I would like to access for each row in my tabular form, the EMPNO value for that row, within a select list (query based LOV) within "MY_LOV" column.

So basically, the column MY_LOV within my tabular form, would be a select list (query based LOV) where MY_EMPNO = :EMPNO (first column in select query above), for each row in the tabular form.


Solution

  • First make a named LOV in your shared components. Then go to the column attributes of the MY_LOV column and for Display As select Select List (named LOV). Then in the List of Values region you can specify which LOV you just created. The value of the select list will be the value of the MY_LOV column in your query, which means this value should also be EMPNO:

    select  
    "EMPNO",  
    "EMPNO" EMPNO_DISPLAY,  
    "ENAME",  
    "HIREDATE",  
    "SAL",  
    "DEPTNO",  
    "EMPNO" "MY_LOV"  
    from "#OWNER#"."EMP"