Search This Blog

Sunday, December 21, 2025

HOW DO I USE DISPLAY-BASED ITEMS IN ORACLE APEX

 In Oracle APEX, Display-Based Items are items that are used to display information to the user, rather than accepting user input. These items are typically used for presenting data or static content on a page without allowing the user to modify it. While they don’t require user input, they can dynamically display content based on certain conditions or database values.

Display-based items can be used to show read-only data, system-generated content, or status indicators, and they are often used to enhance the presentation of an APEX application by making data easier to read and understand.

Types of Display-Based Items

  1. Display Only Items:
    • Display Only items are the most basic type of display-based item in APEX. These items are used to show data that can’t be modified by the user but can be dynamically populated from the database or other sources.
    • Typically, these items are used for displaying information like names, dates, or calculated fields.
    • Example Use Case: Displaying a customer’s full name, product price, or a dynamically calculated field like "Total Order Cost".
  2. Image:
    • The Image item type in APEX allows the application to display an image that is either stored in the database or referenced by a URL.
    • Example Use Case: Displaying a profile image or a company logo on the page.
  3. Progress Bar:
    • The Progress Bar item type can be used to show the progress of a certain process, such as a file upload or a task being completed. The progress can be dynamically updated based on the application's state or through JavaScript.
    • Example Use Case: Showing the progress of a long-running process like data import or report generation.
  4. Chart:
    • The Chart item type is used to display visual representations of data, such as bar charts, pie charts, line graphs, etc.
    • A chart item is typically used to display aggregated or summary data in a graphical format, making it easier for users to understand trends or comparisons.
    • Example Use Case: Displaying sales trends, customer demographics, or performance metrics.
  5. Text:
    • The Text item type is used for displaying static text or HTML content on the page. It can be used to show simple messages, descriptions, or formatted text.
    • Example Use Case: Displaying a description of a product, a welcome message, or an instruction on how to fill out a form.
  6. Link:
    • A Link item in APEX allows you to display a clickable link that can redirect users to another page or URL. This item is commonly used for navigation or to provide external links.
    • Example Use Case: A "Go to Homepage" link or a "View More Details" link to navigate to a related page.
  7. Spacer:
    • The Spacer item is used for adding empty space between other items on the page. It’s not directly visible to users but is useful for creating visual separation between sections of the page.
    • Example Use Case: Adding space between a title and a chart, or between two groups of form fields.

Key Properties of Display-Based Items

  1. Source:
    • Display-based items can have their values populated dynamically from the database or another source, such as a computed value, session state, or a fixed value.
    • This can be controlled through the Source property of the item, which allows you to specify where the data will come from (e.g., a SQL query, a PL/SQL function, or a static value).
  2. Visible:
    • The Visible property determines whether the display-based item is shown or hidden on the page. You can use dynamic actions, conditions, or page logic to control the visibility of these items based on user input, session variables, or other conditions.
  3. Read-Only:
    • By default, display-based items are read-only because they are not meant to accept input from users. However, you can configure certain display items to allow editing if needed (though this is not typical for pure display items).
  4. Format:
    • Many display-based items, such as Text and Display Only, allow you to format the content using HTML, CSS, or APEX's formatting options. This helps make the displayed data more readable or visually appealing.
  5. Style:
    • You can apply custom CSS styles to display-based items to control the font, color, alignment, and other aspects of their presentation. For example, you can use CSS to make a Text item bold, change the background color, or add padding around an Image item.

Benefits of Display-Based Items

  1. Presentation of Data:
    • Display-based items help present data in a more user-friendly manner, allowing the user to easily view important information without needing to edit it. This is useful for read-only displays, summaries, or calculations.
  2. Improved User Experience:
    • By separating the data entry elements from the read-only display elements, you can make your APEX applications easier to navigate. Displaying information in a structured and visually appealing manner helps users focus on the data without distractions.
  3. Dynamic Content:
    • Display-based items can be dynamically updated to reflect changes in the database or application logic. For instance, you can show progress, status updates, or change the content based on user selections or interactions.
  4. Visual Enhancements:
    • Items like Charts, Progress Bars, and Images enhance the visual appeal of your APEX application, making it more engaging for users.
  5. Conditional Display:
    • You can control the visibility of display-based items using conditions and dynamic actions. This is particularly useful when displaying data only when certain conditions are met, improving the relevance of the displayed information.

Use Cases for Display-Based Items

  1. Customer Profile Page:
    • On a customer profile page, display-based items can be used to show user details such as the name, email, address, and profile picture. These are displayed in a user-friendly manner without requiring user input.
  2. Data Summary:
    • Use display-based items to show a summary of key metrics or aggregated data. For example, showing the total sales for a period or the number of items in inventory on a dashboard.
  3. Status Indicators:
    • Display-based items such as progress bars or color-coded status indicators can be used to represent the progress of a long-running process, such as file uploads or report generation.
  4. Instructions or Information:
    • Displaying instructions or information to users, such as "Please review your selections before submitting" or "This is a read-only field."
  5. Report and Dashboard Visualizations:
    • Use charts or progress bars to visualize data in reports or dashboards. This allows users to interpret large datasets more easily by providing a visual representation.

Display-Based Items in Oracle APEX are essential components that allow you to present data in a read-only, visually appealing way. They are not meant to receive user input, but instead, to display important information, system statuses, or visual elements like charts and images. These items help enhance user experience by presenting data in a dynamic, structured format that can be tailored to the specific needs of the application, whether through images, progress bars, or static text.

By using display-based items strategically, developers can create more engaging and intuitive applications, with clear, concise presentations of critical data and status indicators.

HOW DO I USE MULTI-VALUE LIST ITEMS IN ORACLE APEX

 In Oracle APEX, Multi-Value List Items allow users to select multiple values from a list of options. These types of items are particularly useful when you want to allow users to choose more than one value from a predefined set of options, and the selected values will be submitted together when the form is submitted.

Multi-Value List Items can be implemented using different types of items, such as Multi-Select Lists or Checkbox Groups. These items are often used in situations where a user might need to choose multiple categories, features, or other attributes that can apply simultaneously.

Key Features of Multi-Value List Items

  1. Multiple Selections:
    • Unlike single-value list items (like a drop-down list or radio buttons), multi-value list items allow users to select more than one value at a time.
  2. Flexible Data Input:
    • These items provide flexibility in user input, allowing the submission of multiple values that can be stored in the database, often in a comma-separated format or using a collection.
  3. Use Cases:
    • Multi-value list items are useful in scenarios such as selecting multiple categories, features, roles, or interests. Examples include selecting multiple product features in an online form, or multiple departments in a work-related application.

Types of Multi-Value List Items

  1. Multi-Select List:
    • A Multi-Select List is a list where users can select more than one value by holding down the Ctrl (or Cmd on macOS) key (in most browsers) while clicking options. Alternatively, a user can select multiple values by dragging to select a range of options.
    • This item is implemented as a select list but with a special property enabled to allow multiple selections.
    • Example: A user selects multiple skills (e.g., "Java," "SQL," "PL/SQL") in a job application form.
  2. Checkbox Group:
    • A Checkbox Group displays multiple checkboxes where each checkbox corresponds to a specific value. Users can select multiple checkboxes to select multiple options.
    • The selected values are typically returned as a list of values, often in the form of a comma-separated list.
    • Example: A user selecting multiple interests, such as "Sports," "Music," and "Travel."
  3. Shuttle Item:
    • A Shuttle Item is a user interface element that allows users to select multiple items from a list of available options and move them into a "selected" list (usually via buttons). This is useful when there are two lists of options (available and selected), and users can transfer items between them.
    • Example: A user selecting multiple teams to assign to a project from a list of available teams.
  4. Multi-Value Select List:
    • Similar to the multi-select list, but this type uses a multi-select dropdown interface (where users can scroll through and select multiple items from the dropdown) and allows for more compact presentation.

Properties of Multi-Value List Items

  1. List of Values (LOV):
    • As with other list-based items, a multi-value list item requires a List of Values (LOV), which defines the options available for selection. In the case of multi-value list items, the user can choose multiple options from this list.
  2. Separator:
    • The selected values in a multi-value list are typically returned as a single string, often separated by a delimiter (commas, semicolons, etc.). Developers can specify the separator in the separator property to control how the selected values are stored or transmitted.
  3. Default Value:
    • A default value can be specified for the multi-value list item. This can be helpful for pre-selecting options based on previous data, user preferences, or predefined settings.
  4. Required:
    • Multi-value list items can also be marked as required, meaning the user must select at least one value before submitting the form.
  5. Validation:
    • You can set up validation rules for multi-value list items to ensure that the user’s selections meet certain criteria (such as a maximum number of selections or a minimum number of selections).

Advantages of Multi-Value List Items

  1. User Flexibility:
    • Multi-value list items provide users with flexibility, allowing them to select multiple options at once, which is important in many scenarios like survey forms, preference settings, or categorization tasks.
  2. Compactness:
    • A multi-select list (or checkbox group) allows users to select multiple options within a compact space without overwhelming the user with too many options at once. This is more efficient than using separate fields for each possible selection.
  3. Data Submission:
    • Multi-value items allow for cleaner, more efficient data submission. Instead of requiring multiple fields for each potential value, multi-value list items let the user select multiple options within a single input field. The selected values are sent as a list, which can be easily processed.
  4. Reduced Form Complexity:
    • With multi-value list items, you can reduce the number of fields on the form, which enhances user experience and simplifies the design of the page.

Disadvantages of Multi-Value List Items

  1. Potential for User Error:
    • Since multiple values can be selected, there is the potential for users to make errors by selecting too many or too few options. This may lead to validation issues, especially if not handled correctly.
  2. Performance Concerns:
    • If a multi-value list is populated with a large number of items, it could impact performance, especially in terms of page load times and responsiveness. This is something to consider for forms with hundreds or thousands of possible options.
  3. Complicated Validation:
    • Validating multi-value inputs can be more complex compared to single-value inputs, especially when you need to ensure that selections meet certain conditions (e.g., at least one option is selected, or no more than a specific number of options are selected).

Comparison of Multi-Value List Items

Feature

Multi-Select List

Checkbox Group

Shuttle Item

Multi-Value Select List

Selection Type

Multiple values selected using Ctrl or Shift keys

Multiple checkboxes can be selected

Transfer items between available and selected lists

Multiple values can be selected in a dropdown

Data Format

Comma-separated list of selected values

Comma-separated list of selected values

List of selected items

Comma-separated list of selected values

UI

Single dropdown with multi-selection

Multiple checkboxes displayed in a group

Two lists (available and selected) with buttons to transfer

Dropdown with the ability to select multiple items

Ease of Use

Easy to use for compact forms

Intuitive for selecting multiple options

Useful for long lists of options

Compact dropdown interface for multiple selections

Validation

Can be validated for a minimum/maximum number of selections

Can be validated for a minimum/maximum number of selections

Custom validation for selected items

Can be validated for a minimum/maximum number of selections

Use Case

Selecting multiple items from a list (e.g., tags)

Selecting multiple categories, features, or interests

Assigning users or items to groups or projects

Selecting multiple attributes or filters in a compact form

Use Cases for Multi-Value List Items

  1. Survey or Feedback Forms:
    • A user selects multiple preferences or feedback options, such as choosing interests or rating multiple features in a product survey.
  2. Category or Feature Selection:
    • When creating a form where users need to select multiple categories or features, such as choosing product features, service options, or project roles.
  3. Role Assignment:
    • A system that requires multiple role assignments to a user or task (e.g., selecting multiple project teams, department memberships, or permissions).
  4. User Preferences:
    • Allowing users to select their preferred options from a list of predefined choices, such as notification preferences, topics of interest, or language selection.
  5. Search Filters:
    • For filtering search results where users can select multiple filters or attributes (e.g., selecting multiple product categories or price ranges).

Multi-Value List Items in Oracle APEX provide a powerful, flexible solution for allowing users to select multiple options within a form. These items are particularly useful in scenarios where users need to select multiple attributes, categories, or filters in a single form. Whether you're using a multi-select list, checkbox group, shuttle item, or multi-value select list, the ability to select multiple options at once improves the user experience and can simplify data entry and submission. However, developers must carefully manage validation, data handling, and performance concerns to ensure a smooth user experience.

HOW DO I USE MULTI-VALUE LIST ITEMS IN ORACLE APEX

 In Oracle APEX, Multi-Value List Items allow users to select multiple values from a list of options. These types of items are particularly useful when you want to allow users to choose more than one value from a predefined set of options, and the selected values will be submitted together when the form is submitted.

Multi-Value List Items can be implemented using different types of items, such as Multi-Select Lists or Checkbox Groups. These items are often used in situations where a user might need to choose multiple categories, features, or other attributes that can apply simultaneously.

Key Features of Multi-Value List Items

  1. Multiple Selections:
    • Unlike single-value list items (like a drop-down list or radio buttons), multi-value list items allow users to select more than one value at a time.
  2. Flexible Data Input:
    • These items provide flexibility in user input, allowing the submission of multiple values that can be stored in the database, often in a comma-separated format or using a collection.
  3. Use Cases:
    • Multi-value list items are useful in scenarios such as selecting multiple categories, features, roles, or interests. Examples include selecting multiple product features in an online form, or multiple departments in a work-related application.

Types of Multi-Value List Items

  1. Multi-Select List:
    • A Multi-Select List is a list where users can select more than one value by holding down the Ctrl (or Cmd on macOS) key (in most browsers) while clicking options. Alternatively, a user can select multiple values by dragging to select a range of options.
    • This item is implemented as a select list but with a special property enabled to allow multiple selections.
    • Example: A user selects multiple skills (e.g., "Java," "SQL," "PL/SQL") in a job application form.
  2. Checkbox Group:
    • A Checkbox Group displays multiple checkboxes where each checkbox corresponds to a specific value. Users can select multiple checkboxes to select multiple options.
    • The selected values are typically returned as a list of values, often in the form of a comma-separated list.
    • Example: A user selecting multiple interests, such as "Sports," "Music," and "Travel."
  3. Shuttle Item:
    • A Shuttle Item is a user interface element that allows users to select multiple items from a list of available options and move them into a "selected" list (usually via buttons). This is useful when there are two lists of options (available and selected), and users can transfer items between them.
    • Example: A user selecting multiple teams to assign to a project from a list of available teams.
  4. Multi-Value Select List:
    • Similar to the multi-select list, but this type uses a multi-select dropdown interface (where users can scroll through and select multiple items from the dropdown) and allows for more compact presentation.

Properties of Multi-Value List Items

  1. List of Values (LOV):
    • As with other list-based items, a multi-value list item requires a List of Values (LOV), which defines the options available for selection. In the case of multi-value list items, the user can choose multiple options from this list.
  2. Separator:
    • The selected values in a multi-value list are typically returned as a single string, often separated by a delimiter (commas, semicolons, etc.). Developers can specify the separator in the separator property to control how the selected values are stored or transmitted.
  3. Default Value:
    • A default value can be specified for the multi-value list item. This can be helpful for pre-selecting options based on previous data, user preferences, or predefined settings.
  4. Required:
    • Multi-value list items can also be marked as required, meaning the user must select at least one value before submitting the form.
  5. Validation:
    • You can set up validation rules for multi-value list items to ensure that the user’s selections meet certain criteria (such as a maximum number of selections or a minimum number of selections).

Advantages of Multi-Value List Items

  1. User Flexibility:
    • Multi-value list items provide users with flexibility, allowing them to select multiple options at once, which is important in many scenarios like survey forms, preference settings, or categorization tasks.
  2. Compactness:
    • A multi-select list (or checkbox group) allows users to select multiple options within a compact space without overwhelming the user with too many options at once. This is more efficient than using separate fields for each possible selection.
  3. Data Submission:
    • Multi-value items allow for cleaner, more efficient data submission. Instead of requiring multiple fields for each potential value, multi-value list items let the user select multiple options within a single input field. The selected values are sent as a list, which can be easily processed.
  4. Reduced Form Complexity:
    • With multi-value list items, you can reduce the number of fields on the form, which enhances user experience and simplifies the design of the page.

Disadvantages of Multi-Value List Items

  1. Potential for User Error:
    • Since multiple values can be selected, there is the potential for users to make errors by selecting too many or too few options. This may lead to validation issues, especially if not handled correctly.
  2. Performance Concerns:
    • If a multi-value list is populated with a large number of items, it could impact performance, especially in terms of page load times and responsiveness. This is something to consider for forms with hundreds or thousands of possible options.
  3. Complicated Validation:
    • Validating multi-value inputs can be more complex compared to single-value inputs, especially when you need to ensure that selections meet certain conditions (e.g., at least one option is selected, or no more than a specific number of options are selected).

Comparison of Multi-Value List Items

Feature

Multi-Select List

Checkbox Group

Shuttle Item

Multi-Value Select List

Selection Type

Multiple values selected using Ctrl or Shift keys

Multiple checkboxes can be selected

Transfer items between available and selected lists

Multiple values can be selected in a dropdown

Data Format

Comma-separated list of selected values

Comma-separated list of selected values

List of selected items

Comma-separated list of selected values

UI

Single dropdown with multi-selection

Multiple checkboxes displayed in a group

Two lists (available and selected) with buttons to transfer

Dropdown with the ability to select multiple items

Ease of Use

Easy to use for compact forms

Intuitive for selecting multiple options

Useful for long lists of options

Compact dropdown interface for multiple selections

Validation

Can be validated for a minimum/maximum number of selections

Can be validated for a minimum/maximum number of selections

Custom validation for selected items

Can be validated for a minimum/maximum number of selections

Use Case

Selecting multiple items from a list (e.g., tags)

Selecting multiple categories, features, or interests

Assigning users or items to groups or projects

Selecting multiple attributes or filters in a compact form

Use Cases for Multi-Value List Items

  1. Survey or Feedback Forms:
    • A user selects multiple preferences or feedback options, such as choosing interests or rating multiple features in a product survey.
  2. Category or Feature Selection:
    • When creating a form where users need to select multiple categories or features, such as choosing product features, service options, or project roles.
  3. Role Assignment:
    • A system that requires multiple role assignments to a user or task (e.g., selecting multiple project teams, department memberships, or permissions).
  4. User Preferences:
    • Allowing users to select their preferred options from a list of predefined choices, such as notification preferences, topics of interest, or language selection.
  5. Search Filters:
    • For filtering search results where users can select multiple filters or attributes (e.g., selecting multiple product categories or price ranges).

Multi-Value List Items in Oracle APEX provide a powerful, flexible solution for allowing users to select multiple options within a form. These items are particularly useful in scenarios where users need to select multiple attributes, categories, or filters in a single form. Whether you're using a multi-select list, checkbox group, shuttle item, or multi-value select list, the ability to select multiple options at once improves the user experience and can simplify data entry and submission. However, developers must carefully manage validation, data handling, and performance concerns to ensure a smooth user experience.

Thursday, August 21, 2025

HOW DO I USE A STATIC LOV IN A DROPDOWN IN ORACLE APEX

HOW DO I USE A STATIC LOV IN A DROPDOWN IN ORACLE APEX

Introduction
Dropdown lists are a common feature in Oracle APEX applications, allowing users to select a value from a list of predefined choices. One of the most efficient ways to build a dropdown list is by using a Static List of Values (Static LOV). Static LOVs are perfect when the options are limited, rarely change, and do not need to be stored in a database table. By using a Static LOV, developers can provide consistent choices to users while keeping the application lightweight and easy to maintain.

Detailed Explanation
In Oracle APEX, a dropdown list is often created using an item type called Select List. To populate this dropdown, you can either create a Static LOV directly on the item or define it once in Shared Components and reuse it across multiple items. A Static LOV is a collection of label-value pairs where the label (display value) is what the user sees and the return value is what the application processes or stores in the database.

When configuring the dropdown, you choose the Static LOV as the source of values. This ensures that users are restricted to valid options and prevents errors from invalid or inconsistent data entry. Static LOVs are best suited for scenarios like statuses, categories, or priorities where the values are controlled and stable.

Steps to Use a Static LOV in a Dropdown

  1. Open your application in Application Builder.

  2. Go to Shared Components and select Lists of Values.

  3. Create a new LOV and choose From Scratch.

  4. Set the type as Static and enter your Display Value and Return Value pairs.
    Example:
    Display Value: Pending | Return Value: P
    Display Value: Approved | Return Value: A
    Display Value: Rejected | Return Value: R

  5. Save the LOV with a meaningful name, such as APPROVAL_STATUS_LOV.

  6. Now open the page that contains your form or item.

  7. Add or edit an item of type Select List.

  8. Under the List of Values section, choose Named LOV and select APPROVAL_STATUS_LOV.

  9. Save and run the page. Your dropdown will now display the static values, and when the user makes a selection, the corresponding return value will be stored or processed.

Extensive Example
Imagine you are building a task management form where each task has a priority. Create a Static LOV named TASK_PRIORITY_LOV with these values:
Display Value: Low | Return Value: 1
Display Value: Medium | Return Value: 2
Display Value: High | Return Value: 3

In the form, create a Select List item called Task Priority. Associate it with TASK_PRIORITY_LOV. When the user selects “High” from the dropdown, the value stored in the database will be 3. This makes reporting and filtering easier because you work with consistent return codes, while users see friendly labels.

Best Practices

  1. Always create LOVs in Shared Components when they are reused across multiple pages. This ensures consistency and simplifies maintenance.

  2. Use descriptive display values for clarity, but keep return values short and standardized for efficient storage.

  3. Consider using codes for return values (like 1, 2, 3 or P, A, R) and descriptive labels for display values.

  4. If the values are likely to change over time, consider switching to a Dynamic LOV sourced from a database table instead of a Static LOV.

  5. Provide a default or null display value like “Select an option” to improve usability.

Example:

Add a “select one” dropdown box and attach a “Shared components” list of values

A screen shot of a graph

Description automatically generated

Here is how it looks on the page

A screenshot of a computer

Description automatically generated

Oracle APEX Documentation

For more information, refer to the official Oracle APEX documentation on Lists of Values:
https://docs.oracle.com/en/database/oracle/apex/24.2/htmdb/using-lists-of-values.html


Using a Static LOV in a dropdown is one of the simplest and most effective ways to control user input in Oracle APEX. It guarantees that users only select from valid options, ensures consistency across the application, and reduces the need for additional database tables when values are stable. By following best practices and leveraging Shared Components, you can create dropdowns that are both user-friendly and maintainable. Static LOVs provide an excellent balance between simplicity and reliability, making them a key tool in every APEX developer’s toolkit.


HOW DO I CREATE A LIST OF STATIC VALUES IN ORACLE APEX

When developing an Oracle APEX application, you will often need to provide users with a selection of predefined options. These options can be stored and managed as a List of Static Values, a feature within APEX that allows developers to define label-value pairs directly in the application metadata. This approach is useful when the values are limited, do not change frequently, and do not need to be stored in a database table. Creating a List of Static Values is a straightforward process, yet it is powerful for dropdown lists, radio groups, checkboxes, or other items where the user must select from a fixed set of choices.

Detailed Explanation
In Oracle APEX, Lists of Values (LOVs) can be either dynamic (fetched from SQL queries) or static (defined manually). A static LOV is created when you know the choices in advance and they are unlikely to change often. Each entry in the static LOV consists of two parts: a display value, which the user sees, and a return value, which is stored or processed in your application.

For example, if you are building a form where the user must select a status, you can create a static LOV that contains the display values “Open,” “In Progress,” and “Closed,” and return values such as “O,” “P,” and “C.” This ensures that users select from valid, predefined statuses without the need to maintain a lookup table in the database.

Steps to Create a List of Static Values in APEX

  1. Navigate to your application in Application Builder.

  2. Go to Shared Components.

  3. Under the section “Other Components,” select Lists of Values.

  4. Click Create and choose From Scratch.

  5. Enter a meaningful name for your LOV.

  6. Select the type as Static.

  7. Define each entry by providing a Display Value and a Return Value.
    Example:
    Display Value: Open | Return Value: O
    Display Value: In Progress | Return Value: P
    Display Value: Closed | Return Value: C

  8. Save your LOV.

  9. Now you can associate this LOV with items in your application, such as a Select List, Radio Group, or Checkbox item, by choosing this LOV as the source.

Extensive Example
Suppose you are creating a form to capture the priority of a task. The priorities are Low, Medium, and High. You create a static LOV named TASK_PRIORITY_LOV. Inside it you define:
Display Value: Low | Return Value: 1
Display Value: Medium | Return Value: 2
Display Value: High | Return Value: 3

When the user interacts with a Select List item that uses this LOV, they see “Low,” “Medium,” and “High.” When they choose “High,” the database or process stores the return value “3.” This separation of display and return values makes the application easier to manage and allows you to standardize stored values.

Best Practices

  1. Always use meaningful return values. Use codes such as numbers or short abbreviations if you want to keep stored data compact.

  2. Keep display values user-friendly and descriptive.

  3. Reuse LOVs across multiple items by creating them in Shared Components instead of defining them locally in individual items. This ensures consistency and easier maintenance.

  4. If values may change frequently, consider using a dynamic LOV sourced from a database table instead of static values.

  5. Provide a default display value such as “Select an option” for mandatory LOV items to guide users.

Oracle APEX Documentation
For the official Oracle APEX documentation on creating and managing Lists of Values, refer to:
https://docs.oracle.com/en/database/oracle/apex/24.2/htmdb/using-lists-of-values.html

Example

Select the create list of values option from the Shared components > List of Values link

Select build “From Scratch”

Give the LOV a name

A screenshot of a computer

Description automatically generated

Add the static values that you desire

A screenshot of a computer

Description automatically generated

Complete and VOILA!

Creating a List of Static Values in Oracle APEX is an essential skill for any developer who wants to provide users with reliable, predefined choices. It simplifies application development, improves data consistency, and reduces the need for additional database tables when the values are stable. By following best practices such as using descriptive display values and consistent return codes, you can make your applications more user-friendly and maintainable. Whether you are building simple forms or complex workflows, mastering static LOVs will enhance the usability and quality of your APEX applications.


Saturday, August 9, 2025

HOW DO I SET A HOME PAGE

 Setting a home page in Oracle APEX is an essential step in defining the default landing page for your application. The home page serves as the first page users see after logging in, and it often acts as the central hub for navigation, displaying key metrics, summaries, or quick links. By carefully choosing and configuring your home page, you can ensure that users have an intuitive and productive starting point in your application.


To set a home page in Oracle APEX, begin by logging into your application in the Application Builder. From the application’s main screen, open the Shared Components section and locate the Application Definition Attributes. Within this area, you will find an option called Home URL or Default Page (depending on your APEX version). This allows you to specify the page number that should be treated as the home page. You can enter the page number directly (for example, 1 for Page 1) or specify a URL if your home page resides in a different application or location. If you want users redirected to this page after login, ensure the authentication scheme’s post-authentication process also points to the correct home page.

For example, if your application’s dashboard is on Page 10, you would set the default page number to 10. Additionally, you can use the Login Processing settings to redirect users automatically to this page after successful login. In some cases, dynamic logic can be added using application processes or branches to redirect users to different “home” pages based on their role or profile.

A good practice is to keep your home page simple, fast-loading, and role-appropriate. If your application has multiple user types, consider building a universal home page with conditional regions so each user sees content relevant to them. Use clear navigation elements to guide users from the home page to other areas of the application, and ensure that the page works well on both desktop and mobile devices.

Extensive example:
If you have a multi-role application with administrators, managers, and regular users, you can use Server-side Conditions to show an admin dashboard region for administrators, a performance metrics region for managers, and a task list for regular users—all on the same home page. This avoids creating multiple home pages and keeps the maintenance effort low while delivering a customized experience.

Best practices include keeping the home page uncluttered, optimizing queries for performance, and ensuring that the content displayed is updated and relevant. Avoid placing heavy computations directly on the home page; instead, use summaries or pre-aggregated data to keep loading times minimal.

For more detailed information, refer to the official Oracle APEX documentation:
https://docs.oracle.com/en/database/oracle/apex


Step 1 – Navigate to Shared Assets


Step 2 – Navigate to User Interface > User Interface Attributes

A black background with red text

Description automatically generated


Step 3 - Navigate to Attributes > Home URL and change

A screenshot of a computer

Description automatically generated

Select a new page

A screenshot of a computer

Description automatically generated


Setting a home page in Oracle APEX is straightforward but highly impactful. By defining the right landing page and optimizing it for usability and performance, you create a smooth first impression and ensure users can quickly access the information they need. The home page becomes the central hub for your application, so make it clear, useful, and efficient.

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 USE DISPLAY-BASED ITEMS IN ORACLE APEX

 In Oracle APEX, Display-Based Items are items that are used to display information to the user, rather than accepting user input. These it...