Forum Stats

  • 3,825,838 Users
  • 2,260,566 Discussions
  • 7,896,696 Comments

Discussions

APEX Popup LOV - Conditional Select

alexwintersmithlackey
alexwintersmithlackey Member Posts: 10 Green Ribbon
edited Jan 5, 2022 4:35PM in APEX Discussions

Hey, complete newbie here.

I'm wanting a form that inserts rows into a central table 'Action Plan' from various category-specific tables/pages, each with their own unique reference IDs. Key items in the form:

  • Reference (listing the source reference ID)
  • Source (passing static value based on link-to-form source)

The form is built on the Action Plan table. I want the reference field in the form as a Popup LOV conditional against the source.

Use case:

  • user is working in 'Area 1 IG' and wants to insert 'Action Plan' to central table
  • button in 'Area 1' page links to 'Action Plan' form with static value passing to 'Source' field in form
  • 'Reference' field on form presents list of values as 'Area 1 IG' 'Reference Column' to select

I hope this makes sense, and I have a feeling it's a really simple answer. I'm extremely new to APEX and SQL in general.


Thank you

Best Answer

  • Rick-Pick
    Rick-Pick Member Posts: 96 Bronze Badge
    Answer ✓

    If I understand it correctly, you just want to make an LOV conditional on a page item which has a value passed to it from another page. If it is just that it should be simple enough. Include the source item in the "where" clause of your LOV query - for example. "where source = :P1_SOURCE".

    In the "Cascading List of Values" section of the LOV item, select the source item (P1_SOURCE or whatever) in the Parent Item(s). If the source item only ever changes when the page is called from one of the "category" tables, it may not be necessary to do this, but basically it guarantees that when ever the "source" changes the LOV will be refreshed.

    If there is more to it than that, please let me know and I will try to help.

Answers