Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to make a dynamic Select List based on another field's value - without redirect?

DannyS-OracleJul 20 2016 — edited Jul 20 2016

Hi guys, I hope some one can help me solving this problem!

I have two select list (drop down). The first one is to choose between 2 "visit type" (Standard or Non-Standard), the second one is to choose a "location". The list of "locations" in the second select list is determined by which "visit type" chosen in the first select list. I tried implementing the second select list values as "PL/SQL Function Body Returning SQL Query" like this:

DECLARE

    query varchar2(255);

BEGIN

    query := 'SELECT Location_Name AS "d", Location_Name AS "r" FROM Table_Locations';

  

    IF :P4_VISIT_TYPE = 'Standard DC Facility Tour' THEN

        RETURN query || ' WHERE Is_Standard = 1';

    ELSE

        RETURN query;

    END IF;

END;

The problem is, this will not work if P4_VISIT_TYPE value not set. At the P4_VISIT_TYPE's "Page Action on Selection" attribute, it seems there is no option available to set the select list value without redirecting? I want to avoid redirect because I do not want the user to re-type other fields again after the redirect.

EDIT:

I also have tried looking at Dynamic Action, but I think it does not provide something like "Set List of Values for this item" feature?


P.S. I am using Apex v5.0.3

Danny

This post has been answered by Mahmoud_Rabie on Jul 20 2016
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 17 2016
Added on Jul 20 2016
6 comments
2,865 views