Search This Blog

Wednesday, July 23, 2025

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 pattern is especially useful when presenting data with geographic relevance, like store locations, service areas, or project sites. A faceted search allows users to narrow down results using filter controls such as checkboxes, ranges, and search boxes—while the map visually updates based on those selections.

Step-by-Step: How to Build a Faceted Search Map Page

  1. Create a New Page with Faceted Search and Map

    • Go to the APEX App Builder.

    • Click Create Page.

    • Choose Faceted Search from the Reports section.

    • Choose or define a table or SQL query that includes location data (latitude and longitude or a spatial geometry).

    • Enable the Map option when prompted during page creation.

  2. Ensure Your Data Source Supports Spatial Mapping

    • Your source query should return one of the following:

      • latitude and longitude fields.

      • A JSON-formatted geometry column (GeoJSON).

    • Example SQL:

      SELECT store_id,
             store_name,
             city,
             state,
             region,
             category,
             '{ "type": "Point", "coordinates": [' || longitude || ',' || latitude || '] }' AS geometry
      FROM store_locations
      
  3. Configure the Faceted Search Filters

    • After page creation, go to Page Designer.

    • Under Faceted Search, define filters based on fields like:

      • City

      • State

      • Category

      • Region

    • APEX automatically links the facets to your map region if both use the same data source.

  4. Adjust Map Region Settings

    • In Page Designer, select the Map region.

    • Under Source, make sure it uses the same SQL or table as the Faceted Report.

    • Set Geometry Column to your spatial column (e.g., geometry).

    • Set Tooltip Column to a meaningful value like store_name.

    • Ensure Automatic Refresh is enabled so the map updates when filters are applied.

  5. Synchronize Facets with Map

    • APEX links the search filters to both the faceted report and the map automatically.

    • When a user selects a facet, the results in the report and map will reflect the filtered dataset in real time.

Example Use Case

Imagine an application showing healthcare clinics:

  • Users can filter by state, specialty, or accepted insurance.

  • The map automatically updates to show only those clinics that match.

  • Clicking a marker can open a tooltip or link to a clinic's detail page.

Best Practices

  • Keep facets relevant and limited to avoid clutter.

  • Use APEX_UTIL.PREPARE_URL in the map’s tooltip column if you need clickable links.

  • Use icons or clustering on the map for large datasets.

  • Make sure both the report and map share the exact same data source or query logic.

  • Test on both desktop and mobile to ensure filters and map interactions remain user-friendly.

Example:

Faceted search is a very useful search tool when combined with a map.


Step 1- The easiest way to create this is to CREATE a MAP PAGE and make sure that you select the “Create Faceted Search Page” option

A black and red rectangle with a white circle and a red line

Description automatically generated

Step 2 – There will be some options for the faceted search. Select what you want and move on. After the page is created you can add more faceted search options.

Step 3 Add more faceted searches in the left column. Right click on the Facets Region and add your new Facet.

 A screenshot of a computer

Description automatically generated  A screenshot of a computer

Description automatically generated

Step 4 – Select new Facet. Keep in mind that:

  • Facet is a DISTINCT search criteria

  • Too many DISTINCT searches might break the page.


In Identity make sure that you have selected a Checkbox Group

A screenshot of a computer

Description automatically generated

In List of Values, select Distinct values

A screenshot of a computer

Description automatically generated

In Source select the data column that you want to use for search

A black and red rectangle with white text

Description automatically generated

Optionally you can make additional changes in the following areas as desired

A screenshot of a computer screen

Description automatically generated A black and white square with green squares

Description automatically generated

A black rectangular object with white lights

Description automatically generated

Oracle APEX Documentation

For more details on Faceted Search and Maps in APEX:
https://docs.oracle.com/en/database/oracle/apex/
Search for: “Faceted Search”, “Map Region”, and “Spatial Data Visualization”.

Conclusion

A faceted search map page in Oracle APEX offers a powerful and intuitive way to explore spatial data with rich filtering options. By tightly integrating map visuals with user-driven filters, you enhance usability and make your applications more interactive and informative. Whether you're building a store locator, real estate viewer, or any spatial dashboard, this pattern helps users discover data easily and meaningfully.

How Do I Make the Map’s Tooltip Display a Detail Page in Oracle APEX

Map regions in Oracle APEX allow for rich visual representation of spatial data, and tooltips can be extended to do more than show information — they can also become a powerful navigation tool. By configuring map tooltips to act as links, you can guide users from a spatial marker directly to a detail page, improving the user experience and creating a more intuitive, interactive application.

How to Configure a Map Tooltip to Navigate to a Detail Page

  1. Create or Identify the Detail Page

    • In your APEX application, create a Detail Page using the Form or Report + Form wizard, or use an existing one.

    • The page should have a primary key item (e.g., P5_ID) used to fetch the appropriate record.

  2. Prepare Your Map Region's SQL Query

    • Your map SQL query must include the primary key and any relevant fields you want to pass to the detail page.

    • Example:

      SELECT store_id,
             store_name,
             region,
             '{ "type": "Point", "coordinates": [' || longitude || ',' || latitude || '] }' AS geometry,
             '<a href="' || APEX_UTIL.PREPARE_URL('f?p=&APP_ID.:5:&SESSION.::NO:5:P5_ID:' || store_id) || '">' || store_name || '</a>' AS tooltip_html
      FROM stores
      
  3. Set the Tooltip Column to Use HTML

    • In Page Designer, select the Map region.

    • Under the Attributes section:

      • Set Tooltip Column to the tooltip_html column.

      • Enable Escape Special Characters = No (to allow HTML rendering).

    • This configuration ensures that when the user hovers over a map marker, the tooltip contains a clickable link to the detail page.

  4. Alternative: Use Dynamic Actions for Navigation

    • Instead of hyperlinking in the tooltip, you can respond to click events on map features.

    • Create a Dynamic Action on the map region.

      • Event: Custom Event (e.g., mapShapeClick)

      • True Action: Redirect to Page in this Application

      • Set Page: your Detail Page (e.g., 5)

      • Set Items: map your shape's primary key to P5_ID using the &DATA.STORE_ID. syntax.

    • You will need to emit the shape’s ID as part of the feature’s data attributes using the map region’s SQL.

Example Use Case

A store location map with clickable tooltips:

  • Marker: Each store is shown as a pin.

  • Tooltip: "View Store Details" link.

  • Clicking opens Page 5 with full details like sales, hours, and contact info.

Best Practices

  • Always use APEX_UTIL.PREPARE_URL for secure and session-aware URL generation.

  • Use meaningful labels for the tooltip links (e.g., "View Details" instead of a raw ID).

  • Minimize the amount of text in the tooltip; keep it focused on navigation.

  • Use CSS if needed to style the link inside the tooltip to look like a button or clean hyperlink.

  • Test navigation for various screen sizes to ensure tooltips remain accessible and clickable.

Example:

In this example we are going to make the tool tip “clickable and display a pre-existing detail page.

Step 1 – Go to the layer that displays the tooltip.

 

Step 2- Go to the Link area and select the type of redirect that you want

 

Step 3 – Set the link

A screenshot of a computer

Description automatically generated 


Step 4 -  Select

  • Type- In this case “Page in this application”

  • Page – This is the application page number. In this case is page #5.

  • Set Items

    • Name: The name of the control IN THE DESTINATION page

    • Value: The value you are passing TO the destination screen. We are passing the Identity column value.


Save your changes and browse. In this example we open a “drawer” form of the location.


Oracle APEX Documentation

Explore the official documentation for Map regions and navigation techniques:
https://docs.oracle.com/en/database/oracle/apex/
Search for: “Map Region”, “Tooltip Column”, “Dynamic Actions”, “APEX_UTIL.PREPARE_URL”.

Conclusion

Transforming your APEX map tooltips into interactive navigation tools provides a seamless and spatially intuitive way to guide users through your application. By embedding detail page links directly into the tooltips, you create a more dynamic and efficient user experience. With the right SQL, a prepared URL, and proper APEX configuration, this powerful feature is easy to implement and offers a professional enhancement to any map-enabled APEX project.

How Do I Get a Map Report to Work in Oracle APEX

Maps in Oracle APEX allow developers to create highly visual and interactive geographic data displays within their applications. Whether you’re plotting customer locations, delivery routes, or regional sales figures, the Map region provides a powerful, built-in solution. Setting up a map report in Oracle APEX requires understanding spatial data, configuring region settings correctly, and ensuring your data source supports geographic coordinates.

How to Set Up a Map Report in Oracle APEX

  1. Ensure You Have Spatial Data

    • Your data must include a geometry column in either SDO_GEOMETRY or GeoJSON format.

    • The most common format is longitude and latitude stored in a table.

    • Example table:

      CREATE TABLE STORE_LOCATIONS (
        id           NUMBER PRIMARY KEY,
        store_name   VARCHAR2(100),
        longitude    NUMBER,
        latitude     NUMBER
      );
      
  2. Enable Spatial Format for the Data

    • You can either convert longitude/latitude to SDO_GEOMETRY, or use the native geometry support in APEX.

    • Example SQL query for APEX Map Source using GeoJSON:

      SELECT id,
             store_name AS name,
             '{ "type": "Point", "coordinates": [' || longitude || ',' || latitude || '] }' AS geometry
      FROM store_locations
      
  3. Create a Map Region

    • Go to the APEX Page Designer.

    • Add a new Map region.

    • Choose Map as the region type.

    • Under Attributes, set the Geometry Column to the name of your geometry column (e.g., geometry).

    • Set ID Column to the unique identifier (e.g., id).

    • Set Label Column to display names on the map (e.g., store_name).

  4. Choose the Map Layer

    • Oracle APEX uses Oracle Maps or OpenStreetMap as the background.

    • You can configure themes, layers, and clustering.

    • If you’re using Oracle Autonomous Database, Oracle Maps should work out-of-the-box.

    • For other environments, ensure your APEX instance has access to the map service.

  5. Customize Marker Appearance

    • You can define colors, sizes, and icons based on data values.

    • Example: Highlight stores by region or performance level using marker styles.

  6. Add Tooltips or Popups

    • Enable tooltip behavior and use store_name or additional fields.

    • Configure “Info Window” to display details when a marker is clicked.

  7. Optional: Link to Other Pages

    • Set up marker links to navigate to a form page or dashboard with more information.

    • Use the Link section under the region attributes to pass parameters like :ID.

Example Use Case

You want to display a live map of all company store locations:

  • Data table includes store name, lat/lng, and region.

  • Map region shows all store points with icons.

  • Users can click each icon to open a store detail page.

  • Different regions use different colors for visual segmentation.

Best Practices

  • Always validate longitude and latitude data for completeness and accuracy.

  • Index spatial columns when dealing with large datasets for better performance.

  • Use meaningful zoom levels based on your target audience’s geography.

  • Avoid clutter by enabling clustering when displaying many data points.

  • Test the map across devices for responsiveness and interactivity.

  • Use descriptive names and hover details to improve accessibility.

The first thing that you need to make a map work is a way to map your points of interest into the map. This can be done using one of three categories:

  • SDO_GEOMETRY - is a special Oracle Object type which is used by Oracle Spatial. It contains information about the coordinate system used, the type of geometry, the dimensions, data points information as array, etc. Perfect for all kinds of Map Layes, supported in APEX and especially useful when more complex tasks are solved. In use by the SDO_UTIL and SDO_SAM packages, which can determine distances between points on the map, do analysis and others calculations. It can represent all types of geometries – points, polygons, lines and so on.

  • GeoJSON - is a geographical data, represented in a JSON format. It is following a special global standard (GeoJSON format) and is easy to read. Oracle has special datatype to store such information and can index it. It is particularly useful, when working with Javascript and is used when modifying information on the map. It can represent all types of geometries – points, polygons, lines and so on.

  • Longitude/Latitude - is the most popular and easy to understand data type. It represent the 2D coordinates of a point on the map. Most people are already familiar with it and most data sources available can provide you these two.

In this case we will use Longitude/Latitude.

Step 1 – Create a map page

A screenshot of a computer

Description automatically generated

Select table

A screenshot of a computer

Description automatically generated

Select map style

A screenshot of a map

Description automatically generated

Save and Browse

A map of the world

Description automatically generated

Oracle APEX Documentation

Explore official documentation on Map regions and spatial visualization at:
https://docs.oracle.com/en/database/oracle/apex/
Search for "Map Region", "Spatial Data", and "SDO_GEOMETRY" for detailed guidance.

Conclusion

Map reports in Oracle APEX are a dynamic way to bring location-based insights into your applications. By correctly structuring your data and configuring the map region, you can deliver a visually engaging and interactive experience. Whether tracking assets, plotting customers, or analyzing geographic patterns, Oracle APEX maps provide a rich toolset to enhance any business application.

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 Use Data Tables and Reports – Faceted Report in Oracle APEX

Faceted Reports in Oracle APEX offer users an intuitive and powerful way to explore and filter large data sets using dynamic, sidebar-based controls known as “facets.” These facets act like filters that help users narrow down the data based on criteria such as categories, dates, or ranges—without writing any SQL or using complex interfaces. Faceted Reports are ideal for dashboards, product catalogs, customer records, and any interface where quick, user-friendly data exploration is needed.

How to Use Faceted Reports in Oracle APEX

  1. Create a Faceted Report Page

    • Open your APEX application in App Builder.

    • Click Create Page > Faceted Search.

    • Choose Faceted Search with Report.

    • Select your data source, such as a table or SQL query.

    • Define your base query or table, for example:

      SELECT product_id,
             product_name,
             category,
             price,
             in_stock,
             created_date
        FROM products
      
    • Click Next, name the page, and finish.

  2. Configure the Facets

    After the page is created, go to Page Designer.

    • In the Facets section, you’ll see default facets based on your columns.

    • You can configure each facet:

      • Type: List of Values, Checkbox, Range Slider, Date Picker, etc.

      • Source: Table Column or custom SQL.

      • Display Type: Control how the user sees the filter (e.g., checkboxes, links).

      • Sort Order, Count Display, Show Nulls: Customize how values appear.

    Example Facets:

    • Category → List of categories using checkboxes.

    • Price → Range Slider for selecting a price range.

    • In Stock → Yes/No toggle.

    • Created Date → Date range with a date picker.

  3. Configure the Report Region

    • Below the facets, the standard report displays matching results.

    • You can choose the report type: Classic Report, Interactive Report, or Interactive Grid.

    • Format your report columns, define column links, or add dynamic actions.

  4. Enhancing with Dynamic Actions and Custom Logic

    • You can add Dynamic Actions that respond to changes in facet values.

    • Use PL/SQL conditions or JavaScript for advanced interactivity.

    • Create default facet selections for specific use cases.

Example Use Cases

Example 1: Product Catalog

  • Facets: Category, Price Range, Brand, In Stock

  • Report: Grid layout showing product image, name, and price

  • Users can quickly find products with specific attributes

Example 2: Employee Directory

  • Facets: Department, Job Title, Hire Date Range, Location

  • Report: List view with profile photos and contact info

  • Managers filter by team and role to view organizational layout

Example 3: Support Ticket System

  • Facets: Status, Priority, Created Date, Assigned To

  • Report: Interactive Report with ticket details and links

  • Users can drill down into open or overdue tickets quickly

Best Practices

  • Use facet types that match your data:

    • Use Range Slider for numeric data.

    • Use Date Picker for date filtering.

    • Use Checkbox or List of Values for categorical data.

  • Keep the number of facets manageable to avoid overwhelming users.

  • Disable facets for columns with too many distinct values unless necessary.

  • Use a combination of visible and collapsible facet groups for organization.

  • Predefine default facet selections for common use cases.

  • Ensure data is indexed properly for performance.

  • Use "Count Display" sparingly for large datasets to avoid slow queries.

Faceted search allows you to filter different columns on the left side of the page and report on the right side of the page, to get only the data that you need.


Common Settings

  • Remote Body Padding

  • Show Maximize Button

  • Show region Icon

Body Height

Header

Accent

Style

240px

Visible- default

Default

Default

320px

Hidden

Accent 1

Remove Border

480px

Hidden but Accessible

Accent 2

Stack Region

640px


Accent 3

Remove UI decoration



Accent 4

Text Content



Accent 5




Accent 6




Accent 7




Accent 8




Accent 9




Accent10




Accent 11




Accent 12




Accent 13




Accent 14




Accent 15




Styles

Heading Level

Item Spacing

Item Size

Item Width

Label Alignment

Label Position

H1

Default

Default

Default

Right

Inline - Default

H2

Standard

Large

Stretch Form Fields

Left

Show form Labels Above

H3

Slim

X-Large




H4

None





H5






H6







Sort Order Alignment

Top Margin

Bottom Margin

Left Margin

Right Margin

Center

Default

Default

Default

Default

End

None

None

None

None


Small

Small

Small

Small


Medium

Medium

Medium

Medium


Large

Large

Large

Large





A screenshot of a computer

Description automatically generated











Details

A screenshot of a computer

Description automatically generated

A screenshot of a computer

Description automatically generated

Oracle APEX Documentation

To explore more about Faceted Search in Oracle APEX, visit the official documentation:
https://docs.oracle.com/en/database/oracle/apex/
Search for "Faceted Search" for a detailed guide and options.

Conclusion

Faceted Reports in Oracle APEX offer a streamlined, user-friendly approach to exploring data with powerful filtering capabilities. They enable end users to discover patterns, identify subsets, and interact with complex datasets in a visually intuitive way. By using a combination of well-designed facets and responsive reports, you can enhance the overall user experience of your application. Whether for e-commerce, internal dashboards, or enterprise data portals, Faceted Reports can greatly improve usability and engagement.

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 ...