APEX URLs Are More Powerful Than You Think
APEX’s URL syntax, sometimes called the “f?p” syntax, is the backbone of navigation in every APEX application. While most developers know the basics, there are several URL features that can save significant development time and make your applications more flexible.
1. Setting Multiple Items in a Single URL
You can set multiple page items by separating item names and values with commas:
f?p=100:10:&SESSION.::NO::P10_DEPT_ID,P10_STATUS,P10_YEAR:20,ACTIVE,2025
The item names and values are positionally matched. This eliminates the need for separate page processes to set item values on page load for simple navigation scenarios.
2. The Printer Friendly URL Parameter
Adding YES in the eighth position of the URL activates printer friendly mode, which strips navigation menus and chrome, leaving only the page content. This is useful for generating print views or creating simple PDF output when combined with the browser’s print dialog:
f?p=100:10:&SESSION.::YES
3. Clearing Cache for Specific Items or Pages
The sixth position in the URL controls cache clearing. You can clear specific items, entire pages, or use special keywords:
-- Clear all items on page 10
f?p=100:10:&SESSION.::NO:10
-- Clear items on pages 10 and 20
f?p=100:10:&SESSION.::NO:10,20
-- Clear all pages in the application
f?p=100:10:&SESSION.::NO:APP
-- Clear specific items only
f?p=100:10:&SESSION.::NO:P10_STATUS,P10_FILTER
This is particularly useful when navigating to a page that should start with a clean state rather than preserving values from a previous visit.
4. Using APEX_PAGE.GET_URL for Safe URLs
Never hard code f?p URLs in your PL/SQL or reports. Instead, use APEX_PAGE.GET_URL which handles session management, checksum generation, and friendly URL translation automatically:
SELECT APEX_PAGE.GET_URL(
p_page => 10,
p_items => 'P10_EMPLOYEE_ID',
p_values => employee_id
) AS detail_link
FROM employees;
5. Deep Linking With Friendly URLs
When Friendly URLs are enabled (the default since APEX 20.1), your application supports clean paths like /myapp/employees/edit/101. You can map URL segments to page items using the page’s URL Mapping settings in the page designer. This makes your application URLs bookmarkable and shareable without exposing internal item names.
Combined with the Session Zero feature for public pages, you can create direct links to specific records that work without an existing APEX session, which is perfect for links embedded in email notifications.