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!

Apex session global variable not getting set via Advance Dynamic Action

zooidOct 8 2011 — edited Oct 17 2011
Hi,

I am having some difficulty setting a global variable and hope that someone in the forum could point out to me my mistake. i have setup a very simple page (as described below) to test and after having spend countless hours I am still at a loss.

I have defined a Global session variable in apex F200_FOO.
I have a page where a user selects an entry in a "Select List" called PXX_USER_SELECT_LIST.
In the same page a "Text Field" called PXX_USER_LIST_SELECTION to show the ID of the Item the user selected in the List.
Finally in the same page I also have a "Text Field" called PXX_F200_FOO" to show the current value of the global session variable I defined called F200_FOO as mention above.

I have define a Advance Dynamic Action called PXX_GET_USER_SELECTION as follows:
Event = Change
Selection Type = Item
Item = PXX_USER_SELECT_LIST
Condition = No Condition

I have defined two True Actions.

First true Action as follows:
Sequence = 10
Action = Set value
Fire When Event Result Is True = True
Fire On Page Load = True
Stop Execution On Error = True
Select Type : SQL Statement
SQL Statement = SELECT :PXX_USER_SELECT_LIST FROM DUAL
Page Items to Submit = PXX_USER_SELECT_LIST
Escape Special Characters = Yes
Affected Elements = Items
Items = PXX_USER_LIST_SELECTION

Second true Action as Follows:
Sequence = 20
Action = Set value
Fire When Event Result Is True = True
Fire On Page Load = True
Stop Execution On Error = True
Select Type : PL/SQL Function Body
PL/SQL Function Body = BEGIN :F200_FOO := : PXX_USER_SELECT_LIST; END;
Page Items to Submit = I have left this Empty
Escape Special Characters = Yes
Affected Elements = Items
Items = PXX_F200_FOO

When the user selects and entry in the list (PXX_USER_SELECT_LIST) , the Text Field called PXX_USER_LIST_SELECTION shows the ID of the selected Item but the Text Field called PXX_F200_FOO does not show anything. So I can only guess that the second true action defined in the Dynamic Action is not setting the global session variable F200_FOO with the ID value.

I have also tried a variation of the Second true Action as follows but I get Sytaxt errors which I can not resolve.
ALTERNATIVE Second true Action as Follows:
Sequence = 20
Action = Set value
Fire When Event Result Is True = True
Fire On Page Load = True
Stop Execution On Error = True
Select Type : PL/SQL Expression
PL/SQL Expression = :F200_FOO := : PXX_USER_SELECT_LIST;
Page Items to Submit = I have left this emmty
Escape Special Characters = Yes
Affected Elements = Items
Items = PXX_F200_FOO

I summary all I am trying to do is to set a Apex Global Session variable with the ID of an entry in a Select List after the user has made the selection.
Any help or pointer would be much appreciated it before I loss the few remaining strands of hair I have left.

Thank you

Daniel
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 14 2011
Added on Oct 8 2011
5 comments
3,223 views