Search code examples
popuporacle-apexlov

Set hidden values for popup lov


I am trying to use a oracle apex popup lov. Everything works fine. My PLSQL query returns a list of values and it's getting displayed correctly. The question now is if there is a way to store hidden values to theses query results?

For example: The query gets me a list of usernames and their id's. Now i only want to show the username and get the id with plsql later from the popup lov item.

I noticed there is always a HIDDENVALUE item comming with a popup lov. Is this relevant? How to use it?

Thanks in advance,
Filip.


Solution

  • Have a look at the "additional outputs" attributes of the popup lov. It allows to set another page item to one of the column values of the query when a value is selected.

    In my example I have defined a 3rd column in my source query, but you can also take the column alias of the display or return value of the query.

    This example has page item with a popup lov that is a select from the sample EMP table with displayvalue: ename, return value: empno, additional column job. When I select a value, the page item P24_JOB gets set to the value of the job for the selected record.

    Shared component definition:

    shared component definition

    Page item popup lov settings. Note that you don't need more than 2 columns, you could also just set the page item to the display value or return value using that column alias.

    page item configuration