Skip to Main Content



For appeals, questions and feedback about Oracle Forums, please email Please ask technical questions in the appropriate category. Thank you!

Auto-binding on load

user622610Nov 21 2023

I have an APEX Page built using the form template. It is bound to the COUNTRIES table or Oracle's sample HR Schema. It includes a select list for the Country ID and a text field for the Country Name. The Country ID select list has its Page Action on Select set to "Redirect and Set Value". That works, and when the page redirect to itself, it passes P4_COUNTRY_ID:BE (or something similar) on the querystring. Because the Country Name field is bound to the COUNTRIES table, it shows the country name (e.g., Belgium). I have also set the Default value of Country ID to a static value of US, so when the page first loads, US is pre-selected. How can I get it so that the Country Name field automatically is set as well (e.g., to United States) when the page first loads. I don't want to set it statically. I want it to be based on the value set in Country ID. If I were doing this in Django, I would set a default value for the querystring parameter, like country_id = request.GET.get("ID", "US") and use that to bind the other values. Can I do something similar in APEX or is there a different way of achieving the same thing?

It seems like there would be a way to set a default value for P4_COUNTRY_ID that the other bound fields on the form would key off.

Related (but less important): if I manually change the URL to a value that doesn't exist in the database (e.g., P4_COUNTRY_ID:XX), I'd like it to fall back on the default.


This post has been answered by InoL on Nov 21 2023
Jump to Answer
Post Details
Added on Nov 21 2023