Oracle Apex Session Set and Get and understanding Session State
Created by :
Oracle Apex
article
Programming, Software and application
3633
2020-11-26 14:28:43
In Apex, we can set session value different ways- such as
- By Form submission.
- By Binding variable.
- By Computation
- By link URL syntax: f?p syntax.
By Form submission
It is easy to set value in form submitting. Just create input and a button. When you submit a value it will set as session.
By Binding variable
First of all, you need to set a name Application Items in Share Component : Application 108> Shared Components > Application Items > Create / Edit
- After that, Same way as form submitting, you need an input field and a create button.
- Create a Dynamic action which will be button and click action
- In TRUE, Identification action will be Execute PL/SQL Code
- Set value in Settings as follows:
:P33_SESSION_BIND_ITEM_2 := :P33_INPUT_BIND_ITEM_2;
- And set “Items to Submit” as input field name: P33_INPUT_BIND_ITEM_2
- Enjoy.
GET Session Value
In input field:
- Take an input field
- Set PL/SQL Function Body as source type from source properties area.
- Write following command:
BEGIN return :P33_PARAM1; END;
- Fine!
In static or label, write
&P33_SESSION_BIND_ITEM_2.
...