Skip to main content

Attributes

Item Option Manager Pro is a Dynamic Action type plug-in in the Component section. When the plug-in is used, the following attributes describe its behavior.

Action

With Item Option Manager Pro, you can define the specific action you want to execute, whether enabling, disabling, hiding, or showing options. This plug-in puts you in control, allowing you to precisely manipulate the behavior of options based on your application's requirements.

Options:

  1. Disable

  2. Enable

  3. Hide

  4. Show

Scope

The "Scope" option within Itemm Option Manager Pro allows you to define the desired usage. You can specify whether you want to target single or multiple options individually or even simultaneously apply the action to all options. This level of control empowers you to tailor the plug-in's behavior to your specific needs and efficiently manage options within your application.

All

The "Change all existing options on the selected item" option allows you to modify all options associated with the selected item simultaneously. With this option, you can easily apply uniform changes to all options, such as enabling, disabling, hiding, or showing them simultaneously. This provides a convenient and efficient way to manage the behavior of multiple options within a single action.

Option

The "option" option allows you to select a single option from a list of values. Users can choose one specific option from the available list with this option. It ensures that only one option can be selected at a time, providing a streamlined and clear selection mechanism.

Multiple options

The "Multiple" option enables you to select one or more values from the List of Values, allowing for multiple selections. Users can choose multiple values by separating them with a specified separator with this option. This flexibility provides the ability to select and work with multiple options simultaneously, catering to scenarios where multiple choices are desired.

Source type

The "Source Type" option within the Item Option Manager defines the origin of the value used to manipulate the Page Item or Interactive Grid column.

These options provide flexibility in choosing the appropriate source for value retrieval, allowing you to customize and dynamically manipulate options based on your specific requirements.

Options:

  1. Static Assignment

  2. Page Item

  3. JavaScript Code

  4. SQL Query

  5. PL/SQL Expression

  6. PL/SQL Function Body Returning VARCHAR2

All the options listed above have separate fields to enter data, and each of these options will be explained in detail later on in the text document. This comprehensive explanation will provide a clear understanding of utilizing each option effectively within Itemm Option Manager Pro.

Value

The "Static Assignment" option allows you to set a static value or multiple values. If you choose to assign multiple values, please ensure you set the separator to the same value as the one specified in the "Separator" option. This ensures proper parsing and differentiation of multiple options within the plug-in.

Page Item

The "Page Item" option in the Item Option Manager lets you dynamically retrieve values from a specific page item within your application. This dynamic retrieval enhances the user experience by providing a personalized and interactive interface.

When using the "Page Item" option, you can select a page item from the current page and use its value to manipulate the options. This enables you to create dynamic scenarios where the selected page item determines the enabled, disabled, hidden, or shown options.

It's important to note that the "Page Item" option is limited to retrieving values from items within the same page. If you need to retrieve values from an Application Item or an item on another page, consider using the "PL/SQL Expression" option. The "PL/SQL Expression" option allows you to leverage custom PL/SQL code to dynamically fetch values based on your specific requirements, providing greater flexibility in data retrieval.

JavaScript Code

The "JavaScript code" option in the Item Option Manager allows you to utilize any JavaScript expression or function to retrieve the value identifier for options. This allows you to leverage custom JavaScript logic to fetch the necessary values dynamically.

You can write JavaScript code that evaluates expressions or executes functions to determine the value identifier for the options. This opens up a wide range of possibilities, enabling you to incorporate complex calculations, conditions, or external data sources into the retrieval process.

With the "JavaScript code" option, you can create dynamic and custom logic to fetch option values based on your specific requirements. This empowers you to tailor the value retrieval process to suit the unique needs of your application, ensuring a highly flexible and dynamic user experience.

Example:


apex.item("P22_S_SELECT").getValue()

SQL Query Source

The "SQL Query" option in the Item Option Manager allows users to dynamically query values from a database. With this option, you can construct SQL queries that retrieve the desired value or set of values based on specific criteria or conditions.

It's important to note that when using the "SQL Query" option if you are utilizing binding variables within your query that are dynamic on the webpage, you should also include the dynamic option from the plug-in and attach it to the corresponding page items. This ensures the dynamic values are correctly submitted and incorporated into the query execution.

By leveraging the "SQL Query" option, you can seamlessly retrieve values from a database, providing a highly customizable and data-driven approach to option management. This empowers you to create dynamic and responsive applications that adapt to changing data conditions or user preferences.

Examples:

  1. Single value

SELECT DEPTNO

FROM UC_IOM_DEPT

WHERE DNAME = 'SALES';

  1. Multiple values

SELECT DEPTNO

FROM UC_IOM_DEPT

WHERE DEPTNO <> :P13_M_SELECTED;

PL/SQL Expression

The "PL/SQL Expression" option in the Item Option Manager enables users to parse and execute any expression supported by the database. This includes powerful constructs such as case statements, decode statements, date parsing, etc. This option fully supports bind variables, allowing you to incorporate dynamic values into your expressions.

Feel free to utilize the dynamic option provided by the plug-in and attach it to relevant page items. By doing so, you can ensure that dynamic values are correctly submitted and stored in the session if needed for further processing.

With the "PL/SQL Expression" option, you can leverage the full range of expressive capabilities the database offers. This empowers you to create intricate and sophisticated logic to retrieve and manipulate option values, providing a highly customizable and dynamic experience within your application.

Example:


CASE WHEN :P14_S_SELECT IS NULL THEN '10' ELSE :P14_S_SELECT END

PL/SQL Function Body Returning VARCHAR2

The "PL/SQL Function Body Returning VARCHAR2" option in the Item Option Manager opens up possibilities beyond what the PL/SQL Expression offers. With this option, you can harness the power of custom packages, perform complex calculations within the function block, and retrieve one or multiple values separated by a specified separator.

By leveraging this option, developers gain immense flexibility in creating custom PL/SQL functions to retrieve and manipulate option values. You have the freedom to design and implement intricate logic, utilizing the full capabilities of PL/SQL. The function can be tailored to meet specific requirements, allowing for advanced calculations, data transformations, and more.

Furthermore, the option enables you to return one or multiple values from the function, providing even greater flexibility in handling and manipulating options. The ability to separate values by a chosen separator expands the possibilities for dynamic option management.

With the "PL/SQL Function Body Returning VARCHAR2" option, developers can unlock a wide range of capabilities, offering unparalleled flexibility and customization in retrieving and processing option values within their applications.

Example:


begin

--return my_package.procedure(variables);

if :P15_M_SELECT is null

then

return '10,40';

else

return :P15_M_SELECT;

end if;



end;

Separator

The "Separator" option defines the separator character or string when multiple values are involved in executing an action. When there are multiple options to be manipulated, this separator is necessary to properly separate the values within a string.

Specifying the separator ensures that the plug-in can correctly interpret and differentiate individual values within the string. This is particularly useful when assigning multiple values or performing actions on multiple options simultaneously.

The "Separator" option ensures accurate parsing and handling of multiple values, allowing for seamless processing and manipulation of options within Itemm Option Manager Pro.

Most of the time, the separator used is either a comma (",") or a colon (":").

Dynamic Value Fetch

The "Dynamic Value Fetch" option is used to specify whether an AJAX call is required and whether it should be executed during the execution of the dynamic action. Enabling this option allows for dynamic retrieval of values, which is particularly useful when you require page items to be submitted and have those values stored in the database session.

By enabling the "Dynamic Value Fetch" option, Itemm Option Manager Pro will make an AJAX call to fetch the necessary values during the execution of the dynamic action. This ensures that the most up-to-date values are retrieved and utilized in the desired action.

It is essential to test and enable this option when you need page items to be submitted and their corresponding values to be stored in the database session. This ensures the integrity and accuracy of the data within your application.

Page Items to Submit

The "Page Items to Submit" option specifies a list of page items utilized as part of the data source for parsing inside the database when gathering the option value(s). Please list all the relevant page items, separating them with a comma (",") for specificity.

By providing a comprehensive list of the necessary page items, separated by commas, you enable Itemm Option Manager Pro to include these items when retrieving and processing the option value(s). This ensures the required data is accurately submitted and available for parsing within the database, facilitating precise and reliable option value retrieval.

Example:


P1_ITEM_1,P1_ITEM_2