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;
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;
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 := ' ';