Forum Stats

  • 3,767,862 Users
  • 2,252,726 Discussions
  • 7,874,367 Comments

Discussions

Using a form parameter to build a LoV

GeorgeM AU
GeorgeM AU Member Posts: 5 Green Ribbon
edited Sep 18, 2021 6:00AM in APEX Discussions

This is about APEX version 20.2

Just wondering if anyone else has had trouble using a form parameter to help build a list of values via an SQL statement. Here's my statement:

---------------------------------------

select concat(concat(PERSON.SURNAME, ', ') , PERSON.FIRSTNAME) as display_value, PERSON.PERSONID as return_value  

 from PERSON PERSON

 where personid not in (select personid from organizationperson where organizationid = :P10303_ORGANIZATIONID)

 order by 1

------------------------------------------

The issue I am having is that the subquery is not returning any values (as it is above), when I know it should be.

If I replace the parameter ":P10303_ORGANIZATIONID" with a value (eg 2), the subquery returns a list of values as expected.

I have checked and know from other things happening on the page that the parameter does contain a value, its just seems as though the value is not being passed into the sub query.

-----------------------------------------

A little more digging. The SQL statement works perfectly well when the "type" of list is "select list"...it doesn't work when the "type" of list is "Popup LOV"....this looks like a bug in APEX.

Tagged:

Answers

  • fac586
    fac586 Senior Technical Architect Member Posts: 20,069 Red Diamond
    edited Sep 18, 2021 10:28AM

    What are the Settings properties on the Popup LOV item?

    What are the Source properties of item P10303_ORGANIZATIONID? How, when, and where is its value set? Is this another item set by the user at runtime? Does it have a value in session state during page show processing/when the Popup LOV is activated?

    Post this information as text, not screenshots.

  • GeorgeM AU
    GeorgeM AU Member Posts: 5 Green Ribbon

    Settings for Popup LOV:

    Display As: "Inline Popup"

    Initial Fetch: "Automatic"

    Multiple values: off

    Manual entry: off

    Search as you type: off

    ------------------------------

    P10303_ORGANIZATIONID is set by page 10300 (in "Set Items" see below) that calls the page which contains the LOV I'm trying to set up (on page 10303)

    I know the value is being correctly set in page 10300 and received in page 10303 because I can use the value in other elements on the page. And as I said, if I switch to using a "Select List" instead of a "Popup LOV", the subquery works. I'm pretty sure this is an Apex bug.

    "Does it have a value in session state during page show processing/when the Popup LOV is activated?" How would I check this?