Search This Blog

Monday, June 23, 2025

How Do I Pass parameters to other page in application

 

How Do I Pass parameters to other page in application

Introduction

In Oracle APEX, creating seamless navigation between pages is essential for building dynamic, user-friendly applications. One powerful feature that enables this is the ability to pass parameters between pages. Whether you're transferring an employee ID to a detail view or preserving filter settings across navigation, parameter passing allows for personalized and context-aware user experiences. In this guide, we’ll walk through how to pass values from one page to another using built-in APEX functionality like buttons, links, and URL syntax, ensuring your applications are both interactive and efficient.


A screenshot of a computer

Description automatically generated


A screen shot of a computer

AI-generated content may be incorrect.


A screenshot of a computer

Description automatically generated

Objective:

Pass values (parameters) from one page (source) to another page (target) in your APEX application, enabling context-aware navigation (e.g., from a report to a detail view, or from a dashboard to a filtered form).

METHOD 1: Using a Button (Redirect with Parameters)

Step-by-Step:

Step 1: Ensure Page Items Exist

  • On Page A (source), ensure the item holding the value exists (e.g., P1_DEPT_ID).
  • On Page B (target), create a matching page item (e.g., P2_DEPT_ID) to receive the value.

ep 2: Create a Button

  • Page Designer for Page A:
    1. Add a button (e.g., GO_TO_DETAILS).
    2. Set Action = “Redirect to Page in this Application”.
    3. Set Target Page = e.g., 2 (Page B).

Step 3: Set Parameters

  • Scroll to Set Items.
  • Add a row:
    • Name: P2_DEPT_ID
    • Value: &P1_DEPT_ID. (or select P1_DEPT_ID from dropdown)

This maps P1_DEPT_ID from Page A to P2_DEPT_ID on Page B.

Step 4: Use on Target Page

  • On Page B, reference :P2_DEPT_ID in SQL reports, forms, or PL/SQL code.

·         SELECT * FROM DEPARTMENTS WHERE DEPARTMENT_ID = :P2_DEPT_ID

 

METHOD 2: Using a Link in a Report (e.g., IR/IG/Classic)

Step-by-Step:

Step 1: Create Link Column

  • In an Interactive Report or Classic Report:
    • Go to Column Attributes.
    • Click Link.
    • Set Link Target:
      • Page: 2
      • Set Items:
        • Name: P2_EMP_ID
        • Value: #EMPLOYEE_ID# (substitute column name)

Step 2: Create Matching Item on Target Page

  • On Page B, ensure P2_EMP_ID exists.

Step 3: Use Parameter

  • Use :P2_EMP_ID in target page regions or logic.

METHOD 3: Manual URL with Parameters

This is useful for PL/SQL-generated links, dynamic actions, or navigation menus.

URL Format:

f?p=&APP_ID.:2:&SESSION.::NO::P2_DEPT_ID:&P1_DEPT_ID.

Breakdown:

  • &APP_ID. – current application
  • 2 – target page
  • &SESSION. – session
  • P2_DEPT_ID – receiving item
  • &P1_DEPT_ID. – source value

Use this format in dynamic PL/SQL blocks or links.

 

 Important Notes
  •  Always ensure "Maintain Session State" is enabled for the target item.
  •  Avoid passing sensitive data unless encrypted.
  •  Use Before Header processes on the target page to act on parameters early.

 

Real-Life Example

You have a report on Page 1 listing departments. You want users to click a button or link and go to Page 2 to see employees in that department.

  1. Report has DEPARTMENT_ID.
  2. Create link/button → target Page 2 → set P2_DEPT_ID = DEPARTMENT_ID.
  3. On Page 2, use:

4.  SELECT * FROM EMPLOYEES WHERE DEPARTMENT_ID = :P2_DEPT_ID



Here  is another example with Images

A screenshot of a computer

AI-generated content may be incorrect.



A screenshot of a computer

Description automatically generated

Conclusion

Passing parameters between pages in Oracle APEX unlocks a wide range of possibilities, from maintaining user context to driving targeted reports and forms. By leveraging built-in tools like button actions, URL parameters, and item value mappings, developers can create intuitive workflows without writing extensive custom code. Mastering this technique is a key step toward building robust and interactive APEX applications that respond intelligently to user actions.


How Do I Use the Button for Navigation - Using parameters

 

Introduction

In Oracle APEX, buttons can do more than just trigger actions—they can also pass parameters to other pages or applications, enabling more dynamic and context-aware navigation. This is especially useful when you need to carry values like user IDs, form data, or filter criteria from one page to another. In this guide, we'll walk through how to configure a button to navigate to a different page while passing parameters, all using APEX’s intuitive declarative tools. Whether you're building multi-step workflows or simply linking related content, mastering parameterized navigation will make your applications more powerful and interactive.


In Oracle APEX, **Button Navigation Using Parameters** allows you to pass values from one page to another, making your applications dynamic and context-aware. Below is a **detailed step-by-step explanation** on how to implement this feature using Oracle APEX's built-in tools.


GOAL:

Create a button on Page A that, when clicked, navigates to Page B and passes parameters (e.g., item values like `:P1_EMP_ID`) to that target page (e.g., `P2_EMP_ID`).


STEP-BY-STEP GUIDE

Step 1: Add Items to Hold the Data

* On **Page A (source page)**, ensure you have items (e.g., `P1_EMP_ID`) that contain the values you want to pass.

* On **Page B (target page)**, create matching items (e.g., `P2_EMP_ID`) to receive these values.


Step 2: Create a Button on Page A

1. **Go to Page Designer** on **Page A**.

2. In the **Layout** pane, select the region where the button should go.

3. Right-click → **Create Button**.

4. Name it, e.g., `GO_TO_EMP_DETAILS`.

5. Set **Action** to `Redirect to Page in this Application`.




Step 3: Set the Target Page and Pass Parameters

1. In the **Button Attributes**, scroll down to **Behavior**.

2. Under **Target**, set:

   * **Action**: `Redirect to Page in this Application`

   * **Page**: enter `2` (or the actual target page number)

3. Click the **Set Items** link (or use the "Parameters" icon).




Step 4: Define the Parameter Mapping

In the **Set Items** dialog:

* Add a new row for each parameter.
* Example:

  •   Name**: `P2_EMP_ID` (Item on Page B)
  •   Value**: `&P1_EMP_ID.` or select `P1_EMP_ID` from the dropdown

This means: "Set `P2_EMP_ID` on Page 2 to the value of `P1_EMP_ID` from Page 1".

Click **OK** to save.




Step 5: Use the Parameter on the Target Page (Page B)


On **Page B**:

* Use `:P2_EMP_ID` in any SQL queries, dynamic actions, or PL/SQL logic.

* Example in a report's SQL:

  SELECT * FROM EMPLOYEES WHERE EMPLOYEE_ID = :P2_EMP_ID


 OPTIONAL: Using URL Parameters

If you're manually building a URL or need to pass parameters programmatically:

f?p=&APP_ID.:2:&SESSION.::NO::P2_EMP_ID:&P1_EMP_ID.

This means:

* `f?p=`: APEX page call

* `&APP_ID.`: current app ID
* `2`: target page
* `&SESSION.`: session ID
* `P2_EMP_ID`: name of the item to set
* `&P1_EMP_ID.`: value from current page

Use this format in a **dynamic action** or PL/SQL-generated URL.

Best Practices

* Always validate that the receiving item (e.g., `P2_EMP_ID`) exists and has correct **Session State** enabled.
* Use **Before Header Process** on target page to act on parameter values.
* For security, avoid passing sensitive data via URL unless encrypted or obscured.

Here is a page with two fields and 1 button. We want to go to a second page and pass the values from the field in the URL.

A screen shot of a computer

Description automatically generated



In the Behavior area, select the redirect to URL and build the URL with the parameters included.

A black background with white text

Description automatically generated

Conclusion

Using button navigation with parameters in Oracle APEX allows you to create seamless, data-driven transitions between pages. By passing values through URL parameters or APEX items, you can control what information is available on the next page, enhancing the user experience and maintaining context throughout your app. As you've seen, this functionality is easy to implement and requires no complex coding—just clear configuration. With this technique, you’re now better equipped to build smarter, more responsive APEX applications.

How Do I use the Button Navigation - Redirects to GOOGLE

 

Introduction In Oracle APEX, buttons are a key part of building intuitive user interfaces—and they can do much more than just submit forms. One common use case is **navigating to an external website**, such as Google, directly from a button click. Whether you're creating shortcuts, integrating third-party services, or linking to external documentation, APEX makes it simple with built-in navigation options. In this quick guide, we’ll walk you through how to configure a button to redirect users to Google using APEX’s declarative settings—no custom coding required.

Lets add a new button.

A screen shot of a computer

AI-generated content may be incorrect.

Go to the button’s behavior and select the “Execution Validations” to “Redirect To URL”.

A screenshot of a computer

AI-generated content may be incorrect.

Add the URL that you want to navigate to.


A screenshot of a computer

Description automatically generated

Here is the result:

A screenshot of a computer

AI-generated content may be incorrect.

clusio

Conclusion Redirecting users to an external site like Google using a button in Oracle APEX is straightforward and requires no custom code. By simply configuring the button’s **Action** to “Redirect to URL” and specifying the destination, you can create seamless navigation experiences within your app. Whether you're linking to external tools, resources, or documentation, this approach helps keep your application user-friendly and connected. As you continue developing, consider how button-based navigation can enhance both usability and workflow efficiency in your APEX projects.

Redirecting users to an external site like Google using a button in Oracle APEX is straightforward and requires no custom code. By simply configuring the button’s **Action** to “Redirect to URL” and specifying the destination, you can create seamless navigation experiences within your app. Whether you're linking to external tools, resources, or documentation, this approach helps keep your application user-friendly and connected. As you continue developing, consider how button-based navigation can enhance both usability and workflow efficiency in your APEX projects.

Creating Button Actions

 

Creating Button actions

In Oracle APEX, buttons are more than just static elements—they serve as powerful triggers for dynamic behavior within your application. By using Dynamic Actions, you can define what happens when a user interacts with a button, all without writing complex JavaScript. APEX provides an intuitive, declarative interface that lets you easily set conditions, target page items, and define actions such as showing alerts, hiding fields, or navigating to another page. This section walks through the process of creating a button action using a simple JavaScript alert as an example, illustrating how easy it is to bring interactivity to your app.


Buttons work via Dynamic Actions and Java Script. In APEX, Dynamic Actions provide developers with a way to define client-side behavior declaratively without the need-to-know JavaScript. Using a simple wizard, developers can select a page item, a condition, enter a value, and select an action.

A screenshot of a computer

AI-generated content may be incorrect.


Adding the Dynamic Action will create a dynamic action and a True / False actions. In this case we see a new action under the “True” branch.

A screenshot of a computer

AI-generated content may be incorrect.

Select a JavaScript action

A screenshot of a video

AI-generated content may be incorrect.

Lets add the following alert

alert('not a valid user');


A screenshot of a computer

AI-generated content may be incorrect.

Here is the result:

A screen shot of a computer

AI-generated content may be incorrect.

Conclusion

By leveraging Dynamic Actions in Oracle APEX, you can enhance your application’s interactivity without diving deep into JavaScript. As demonstrated, even a simple action—like displaying an alert message when a button is clicked—can be implemented quickly using APEX’s declarative tools. This approach not only speeds up development but also keeps your logic organized and maintainable. As you continue building your application, you can expand on these foundations to create more complex behaviors, improving both functionality and user experience without having to know JavaScript. Using a simple wizard, developers can select a page item, a condition, enter a value, and select an action.

Creating your first APEX Application

Introduction

Oracle APEX (Application Express) offers a low-code environment for rapidly building scalable, secure web applications. Whether you're a seasoned developer or just starting out, reating an application in APEX is a structured and intuitive process. This guide walks you through the foundational steps—from selecting your application type and adding pages, to customizing regions and building interactivity with dynamic actions. By the end, you'll have a working application and a solid understanding of how APEX components come together to create a dynamic user experience.

Creating the Application

Step 1: Select the APP Type

To begin creating your application in Oracle APEX, start by selecting the type of app you want to build. From the APEX home screen, click on “Create” and choose “New Application.” You’ll be presented with various options such as “Desktop,” “Mobile,” or “Progressive Web App (PWA),” depending on your project needs. Most standard web applications begin with the “Desktop” option, which provides a flexible and responsive interface suited for most business use cases. Once selected, you’re ready to move on to defining your app’s structure.


A black rectangular object with a white border

AI-generated content may be incorrect.


Step 2: Select Create

After choosing your app type, proceed by clicking the “Create” button. This action initiates the application creation wizard, where you’ll begin configuring key settings such as the application name, features to include (like authentication or activity reporting), and the overall layout. At this stage, you’re essentially laying the groundwork for your application’s structure, so take a moment to review the available options before continuing. Once everything looks good, click “Next” to continue building your app.

A black rectangular object with a white border

AI-generated content may be incorrect.


Step 3: Create Application

With your app type selected and initial settings configured, it's time to generate the application. Click the “Create Application” button to finalize your choices. APEX will now build the application framework based on your selected options—this includes generating default pages, navigation menus, and any features you've opted to include, such as user authentication or activity monitoring. Once the process completes, your new application will open in the App Builder interface, ready for further customization and development.

A screenshot of a computer

AI-generated content may be incorrect.



A screenshot of a computer

AI-generated content may be incorrect.


A screenshot of a computer

AI-generated content may be incorrect.


A screenshot of a computer

AI-generated content may be incorrect.

Making use of the Global page (Page 0)

As the name implies, the Global page is global to the application. Any field or action that is displayed on that page will be displayed, or be accessible, to every other page in the application.

This CAN be used as a sort of “Global Variable” holder, but global variables are best used via the “Application Items”


In Oracle APEX, Page 0—commonly known as the Global Page—serves as a powerful tool for creating elements that should appear across every page in your application. Think of it as a universal template: any components, such as buttons, items, or regions, added to Page 0 will automatically render on all other pages.


For example, if you add a hidden item like P0_SPECIALID to Page 0 and set its value using a Dynamic Action on page load (e.g., fetching the logged-in user's username via a PL/SQL expression), that value becomes available throughout the app. This makes Page 0 especially useful for storing global variables or UI elements that should remain consistent across your application—such as headers, messages, or navigation aids—without needing to duplicate them on every individual page.


Here is an example:

Page 0 has a field called P0_SPECIALID

A screenshot of a computer

Description automatically generated

That field is filled by an “On Page Load” Dynamic Action

A screenshot of a computer

Description automatically generated

The Dynamic Action 

  • Sets a value

A black and white text

Description automatically generated

  • The value is generated by a PL/SQL Expression that gets the Username

A screenshot of a computer

Description automatically generated

  • And is saved to the Affected Elements

A black and white text

Description automatically generated

The result is that every page will display that field with the selected value like this:

A close-up of a website

Description automatically generated


Another way to create an application in APEX is using the ORACLE APEX Quick SQL code. This is a way of developing a data model, which can then be used to develop the application itself.

Step 4: Adding a page to the application

To expand your application’s functionality, you’ll need to add new pages. Begin by clicking the “Create Page” button within the App Builder. You’ll be prompted to choose the type of page you want to add—this could be a form, report, chart, dashboard, or a completely blank page, depending on your needs.

After selecting the desired page type, enter a page name, optionally define a page number, and then click “Create Page.” APEX will generate the new page and add it to your application's navigation and structure. This modular approach allows you to build out your application one page at a time, keeping everything organized and easy to manage.


Click on the ‘Create page” button.

A screenshot of a computer

AI-generated content may be incorrect.

Select the type of page that you want to add

A screenshot of a computer

AI-generated content may be incorrect.

Add the name of the page, the page type, and press the “Create Page”

A screenshot of a computer

AI-generated content may be incorrect.

Finally you get something that loos like this

A screenshot of a computer

Description automatically generated

Step 5: Adding fields to the application

Once you’ve created a new page, you can begin adding fields to collect or display data. In the Page Designer, right-click on the “Body” section under the page layout tree and select “Create Region.” This creates a container where you can place your fields—think of it as similar to a <div> in HTML.

Next, from the Component Palette on the left, drag and drop a “Text Field” into the new region’s “Region Body.” The field will appear in both the visual layout on the right and the logical structure on the left. You can repeat this step to add additional fields as needed.


This visual, drag-and-drop approach makes it easy to design your page layout and quickly build forms, data inputs, or display elements that are fully integrated with your application’s logic.


In the Page

  1. Right click on “Body”

  2. Select “Create region”

A screenshot of a computer

Description automatically generated

Next:

  1. Drag a “text Field”

  2. …Into the “Region Body”

A screenshot of a computer

AI-generated content may be incorrect.

Now you should see your new control in two places (on the left and the right), both represents the same region. FYI: regions are somewhat synonymous to “DIV” in an HTML web page.

A screenshot of a video editing

AI-generated content may be incorrect.


Step 6: Changing the name of the field and Page

To improve clarity and maintainability, it's a good practice to rename fields and pages with meaningful identifiers. In the Page Designer, select the field you want to rename. On the right-hand side under the “Property Editor,” locate the “Name” property in the Page Item section. Update the name to something descriptive—such as P1_USERNAME instead of the default like P1_TEXT_FIELD1.

To rename the page itself, click on the page node at the top of the layout tree. In the Identification section on the right, you can update both the Page Name and Page Title. This name will appear in your app’s navigation and help you stay organized as your application grows. Once changes are made, be sure to save your work.


You can rename a field by  going to the right hand “Page Item” area. In the “Name” field, change the current field name to the new name.


A screenshot of a computer

AI-generated content may be incorrect.

A screenshot of a computer

AI-generated content may be incorrect.


The field name has now displays the new name given to the control.

A screen shot of a video editing

Description automatically generated


Moving fields around the page

Oracle APEX makes it easy to rearrange fields visually within a page using the Page Designer. If you’ve added multiple fields and want to organize them more effectively, simply drag and drop the field items in the layout section.


For example, if you created a new region called “Information” and want to move existing fields into it, locate the fields under the layout tree on the left, then drag them into the “Information” region’s “Region Body.” You’ll see the changes reflected both in the layout editor and in the visual preview on the right.

This flexibility allows you to structure your forms or display regions in a way that’s intuitive and user-friendly, without writing a single line of code.


Notice that the following page shows the two fields above the “New” Region

A screenshot of a computer

AI-generated content may be incorrect.


Drag the two fields to the “New” region

A screenshot of a computer

Description automatically generated

The fields should look like the following.

A screenshot of a computer

AI-generated content may be incorrect.


Changing the title of a page

To customize how your page appears in the application, you can easily change its title. In the Page Designer, select the page node from the left-hand tree view. Then, in the Identification section on the right, locate the Page Title field.

Update the title to something more meaningful or user-friendly, such as “Customer Details” or “Order Summary.” This new title will appear in the browser tab and can also be used in navigation menus, helping users understand the purpose of the page at a glance.

Once updated, save your changes to apply the new page title throughout your application.

Select the “Page” at the top of the left hand tree.

Make changes to the Identification area


Notice the changes below

A screenshot of a computer

AI-generated content may be incorrect.


Step 7: Setting a region’s display tittle

Regions in Oracle APEX act as containers for your page content, and each region can have its own display title or header. To change a region’s title, select the region in the Page Designer—you can find it listed under the page’s layout tree.

Next, go to the Identification section on the right and locate the Title property. Enter the new display title you want, such as “Information,” “User Details,” or any label that fits the content inside the region.

This title will appear as the header for that region on your page, helping users quickly understand the context of the information presented. Don’t forget to save your changes to see the updated region title in your application.


Lets change the Region from “New” to “Information”

A screenshot of a phone

Description automatically generated

Navigate to the Region’s Identification area.

A screen shot of a video game

AI-generated content may be incorrect.

Change the title to display a new Title header

A screen shot of a video game

Description automatically generated

The change will display as follows

A screenshot of a computer

Description automatically generated


Step 8: Adding a button

To add interactivity to your application, you can easily add buttons using the drag-and-drop interface in the Page Designer. Locate the Buttons section in the component palette, then drag a Button item onto the desired region or button position on your page.

APEX regions support multiple button layout locations—such as Above Region, Inline, Below Region, or Right of Region—so choose the placement that best fits your design. Once added, you can customize the button’s label, appearance, and behavior via the Property Editor.

Buttons in APEX trigger actions through Dynamic Actions or JavaScript, allowing you to define client-side behaviors without coding by using simple wizards. This makes it easy to create buttons for submitting forms, navigating pages, or performing custom tasks within your app.


Drag and drop button from the buttons area

A screenshot of a computer

AI-generated content may be incorrect.


Button Layout locations



The regions have 4 locations that can hold buttons. See below.

A screenshot of a computer

AI-generated content may be incorrect.

Creating Button actions

Button Layout Locations

In Oracle APEX, regions provide multiple predefined locations where you can place buttons to organize your page layout effectively. The common button layout positions include:

  • Above Region: Places the button above the main content area of the region.

  • Inline: Displays the button within the region header, usually aligned with the title.

  • Below Region: Positions the button below the region’s content area.

  • Right of Region: Places the button to the right side of the region header or content, depending on the layout.

Choosing the appropriate button location helps improve user experience by placing controls where users expect to find them. You can set the button’s position in the Property Editor under the button’s Layout settings when you select the button in Page Designer.


Buttons work via Dynamic Actions and Java Script. In APEX, Dynamic Actions provide developers with a way to define client-side behavior declaratively without the need to know JavaScript. Using a simple wizard, developers can select a page item, a condition, enter a value, and select an action.

A screenshot of a computer

AI-generated content may be incorrect.


Adding the Dynamic Action will create a dynamic action and a True / False actions. In this case we see a new action under the “True” branch.


Final Thoughts

By following these step-by-step instructions, you've now created a basic yet functional Oracle APEX application—from selecting the app type, designing pages and regions, to adding interactivity through buttons and dynamic actions. Along the way, we explored the power of the Global page and how reusable fields like P0_SPECIALID can provide consistency across your application. While this guide focuses on the essentials, APEX offers a rich set of tools and customizations to help you scale your app as needed. With your foundational setup complete, you're ready to begin refining, testing, and expanding your application to meet real-world needs.