Developers can use preferences to store values for a specific Application Express user across distinct sessions. Once set, these preferences can be removed programmatically or manually. Administrators can set user preferences by creating a page process, by the calculation of a preference Item Source Value, or programmatically by using a PL/SQL API.
Workspace administrators can set user preferences within an application by creating a page process, creating a preference item, or programmatically using a PL/SQL API.
Developers can set user preference values by creating a page process.
To set user preference values by creating a page process:
See Also:
"Creating Page Processes in Page Designer" in Oracle Application Express App Builder User’s Guide
You can set the source of an item based on a user preference by defining the item source type as Preference.
To define the source of item based on a user preference:
You can set or reference user preferences programmatically using a PL/SQL API.
User-level caching is available programmatically. You can use the SET_PREFERENCE
procedure to set a user level preference called NAMED_PREFERENCE
. For example:
APEX_UTIL.SET_PREFERENCE( p_preference=>'NAMED_PREFERENCE', p_value =>:ITEM_NAME);
You can reference the value of a user preference using the function GET_PREFERENCE
. For example:
NVL(APEX_UTIL.GET_PREFERENCE('NAMED_PREFERENCE'),15)
In the previous example, the preference would default to the value 15 if the preference contained no value.
See Also:
GET_PREFERENCE Function and SET_PREFERENCE Procedure in Oracle Application Express API Reference
View user preferences by user on the Preferences by User page.
To view the preferences by user:
View current user preferences.
To view current user preferences:
Purge preferences for a specific user on the Purge Preferences page.
To purge preferences for a specific user:
Purge preferences for the current user on the Current User Preferences page.
To purge preferences for the current user:
Remove user preferences programmatically using a PL/SQL API.
To remove user preferences programmatically, use the REMOVE_PREFERENCE
procedure to remove a user level preference called NAMED_PREFERENCE
. For example:
APEX_UTIL.REMOVE_PREFERENCE( p_preference=>'NAMED_PREFERENCE');
See Also:
"REMOVE_PREFERENCE" in Oracle Application Express API Reference
Reset user preferences by creating a page process and selecting the Reset Preferences process type.
To reset user preferences using a page process:
See Also:
"Creating Page Processes in Page Designer" in Oracle Application Express App Builder User’s Guide