Search This Blog

Showing posts with label navigate. Show all posts
Showing posts with label navigate. Show all posts

Wednesday, July 23, 2025

How Do I Use a Card Display to Navigate to a Form in Oracle APEX

Oracle APEX offers a modern, user-friendly way to present and navigate data using Cards. Card regions can display key data points in a visual format and are perfect for providing users with a summarized view of records. A powerful use case is to allow users to click on a card to navigate directly to a form where they can view or edit the full details of that record. This makes your application not only more interactive but also more intuitive.

How to Set Up a Card Display That Links to a Form

  1. Create a Card Region

    • In your APEX app, go to a page where you want to display the cards.

    • Add a new region and choose the Cards region type.

    • Set the region source to a SQL query that retrieves the relevant records.

    • Example:

      SELECT id,
             employee_name,
             job_title,
             department,
             hire_date
      FROM employees
      
    • Make sure the id column (or your primary key) is included, as you'll use it for navigation.

  2. Configure the Card Template

    • In the Cards region, map the columns to the visual elements:

      • Title: employee_name

      • Subtitle: job_title

      • Body: department

      • Badge or Media: optional fields like hire_date

    • Set the Link property:

      • Target: Page in this Application

      • Page: Select your form page (e.g., Page 10)

      • Set Items: Assign the id column to the form's primary key item, e.g., P10_ID

      • Clear Cache: Clear the cache for the form page, usually 10

  3. Create the Form Page

    • If not already created, add a Form > Form on a Table with Report or Form on a Table or View.

    • Ensure the form page accepts the P10_ID parameter in the page item.

    • Add validations or processing logic as needed.

  4. Test the Navigation

    • Run your app.

    • You should see a card layout.

    • Clicking on a card should take the user to the form page, with that record loaded for viewing or editing.

Example Use Case

Suppose you’re building an employee management app:

  • Page 5 has a Card region showing employee profiles.

  • Each card shows the name, job title, and department.

  • Clicking a card takes the user to Page 10, which has a form to update the employee's full record.

  • The id from the card is passed as a parameter to the form.

Best Practices

  • Always use a primary key or unique identifier in your card’s SQL source.

  • Use meaningful visual hierarchy in card templates: names in titles, roles or dates in subtitles or body.

  • Avoid long texts in card body sections to keep layouts clean.

  • If performance becomes an issue, limit the number of displayed cards using pagination or filters.

  • Consider using icons, media, or color badges to highlight statuses or categories.

  • When passing parameters to forms, use item-based linking (Set Items) instead of URL parameters for security and cleaner URLs.

Cards don’t have links but they can have Actionbuttons.

Step 1 – Create a Card report for the CUSTOMER table

Step 2- Add an action to the CARD region, make it a Type: Button, and name it Edit

A screenshot of a computer

Description automatically generated   A screenshot of a computer

Description automatically generated

Step 3  -  Create  link to page 41 and pass the correct values

A screenshot of a computer

Description automatically generated

A screenshot of a computer

Description automatically generated

Step 4- change the button’s appearance if you need to

A screenshot of a computer

Description automatically generated

Save and Browse

 


A screenshot of a computer

Description automatically generated 

Pressing the button fires the navigation to the form page.
A blue and white rectangular object

Description automatically generated 

Oracle APEX Documentation

For more detailed guidance on Cards and Navigation in APEX, refer to the official documentation:
https://docs.oracle.com/en/database/oracle/apex/
Search for “Card Region” and “Page Navigation” for specific tutorials and parameters.

Conclusion

Using Card displays to navigate to forms in Oracle APEX creates a modern and efficient user interface that bridges the gap between summary views and detailed records. This method is ideal for applications that require a quick overview with easy access to record management. With just a few configuration steps, you can deliver a professional and user-friendly experience to your users, streamlining workflows and improving productivity.

How Do I Make a Faceted Search Map Page in Oracle APEX

Combining faceted search with a map region in Oracle APEX enables users to filter data visually and spatially at the same time. This design ...