This content has been marked as final. Show 5 replies
Try to have a computation to set the value of the select list if the value is null.
Unfortunately, that doesn't fix it
Hello 989514,1 person found this helpful
Could you change your number to a handle (Fred, Sue, Nema, Patrick, ...) for us. [I'm Howard.]
If you're thinking you might visit here often, please see https://forums.oracle.com/forums/ann.jspa?annID=1324.
Now, to your question. The way I've handled this is with a "first-time" flag. I create an application item :FIRST_TIME and set it to some default value, 'YES'. Then in a before header process on the page, I have:
BEGIN IF :FIRST_TIME = 'YES' THEN SELECT 'default value' INTO :P3_SELECT_LIST_VARIABLE FROM DUAL; SELECT 'NO' INTO :FIRST_TIME FROM DUAL; END IF; END;
Thanks for the advice, Howard.
I think that this could solve my problem.
I have created the first_time item and the corresponding process. Although I have created a "before process" the process is only active after changing the value of the first select list and not when the page loads.
What can I do about that behaviour?
If you created it in the "Before Header" area of "Page Rendering," then it should execute among the very first things on any page load. That's how it works. And, as I recall, page items should have their values immediately for use -- even before any page submits.
Here's an example that worked for me:
This code was on a page displaying "month" data and here's what it does. If :F217_PAGE_NAME_FLAG = 'Month', we're reloading the Month-page, so save the select list value on this page (:P3_SL_SYS_NIC_NM) in the application item (:F217_SYS_NIC_NM). Other wise I'm coming to the Month-page from some other page, e.g., the Quarter-page, and I want to bring the select list value (saved in :F217_SYS_NIC_NM) and use it to set the currently selected value of the select list on this page. So as I go from page to page to page, whatever I most recently set the select list value to on any page, that's the value I see on the current page. Until I change it to something new.
IF :F217_PAGE_NAME_FLAG = 'Month' THEN SELECT :P3_SL_SYS_NIC_NM INTO :F217_SYS_NIC_NM FROM DUAL; ELSE SELECT :F217_SYS_NIC_NM INTO :P3_SL_SYS_NIC_NM FROM DUAL; SELECT 'Month' INTO :F217_PAGE_NAME_FLAG FROM DUAL; END IF;
Worked for me in 4.1.
(more) And here's a quirk.
I don’t understand why yet but neither of these “nulls” the variable where I am using it in P7.
So that I could successful test the value, I had to use
:P7_TOO_MANY_PKTS_MSG := NULL; :P7_TOO_MANY_PKTS_MSG := '';
to initialize. Was the problem in the initialization -- or in my test? ???
:P7_TOO_MANY_PKTS_MSG := ' ';