2.11 Managing User Preferences
Developers can use preferences to store values for a specific Oracle APEX 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.
- Setting User Preferences
Developers can set user preferences within an application by creating a page process, creating a preference item, or programmatically using a PL/SQL API. - Viewing Preferences by User
View user preferences by user on the Preferences by User page. - Viewing Current User Preferences
View current user preferences. - Purging Preferences for a Specific User
Purge preferences for a specific user on the Purge Preferences page. - Purging Preferences for the Current User
Purge preferences for the current user on the Current User Preferences page. - Removing User Preferences Programmatically
Remove user preferences programmatically using a PL/SQL API. - Resetting User Preferences Using a Page Process
Reset user preferences by creating a page process.
Parent topic: Workspace and Application Administration
2.11.1 Setting User Preferences
Developers can set user preferences within an application by creating a page process, creating a preference item, or programmatically using a PL/SQL API.
- Setting User Preferences by Creating a Page Process
Set user preference values by creating a page process. - Setting the Source of an Item Based on a User Preference
Set the source of an item based on a user preference by defining the item source type as Preference. - Setting User Preferences Programmatically
Set or reference user preferences programmatically using a PL/SQL API.
Parent topic: Managing User Preferences
2.11.1.1 Setting User Preferences by Creating a Page Process
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 Oracle APEX App Builder User’s Guide
Parent topic: Setting User Preferences
2.11.1.2 Setting the Source of an Item Based on a User Preference
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:
Parent topic: Setting User Preferences
2.11.1.3 Setting User Preferences Programmatically
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 APEX API Reference
Parent topic: Setting User Preferences
2.11.2 Viewing Preferences by User
View user preferences by user on the Preferences by User page.
To view the preferences by user:
Parent topic: Managing User Preferences
2.11.3 Viewing Current User Preferences
View current user preferences.
To view current user preferences:
Parent topic: Managing User Preferences
2.11.4 Purging Preferences for a Specific User
Purge preferences for a specific user on the Purge Preferences page.
To purge preferences for a specific user:
Parent topic: Managing User Preferences
2.11.5 Purging Preferences for the Current User
Purge preferences for the current user on the Current User Preferences page.
To purge preferences for the current user:
Parent topic: Managing User Preferences
2.11.6 Removing User Preferences Programmatically
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 APEX API Reference
Parent topic: Managing User Preferences
2.11.7 Resetting User Preferences Using a Page Process
Reset user preferences by creating a page process.
To reset user preferences using a page process:
See Also:
Creating Page Processes in Oracle APEX App Builder User’s Guide
Parent topic: Managing User Preferences