Skip to Main Content

Breadcrumb

Examples

Set Value by using the Return Value

Selecting the "Initialize API" option in the Action attribute creates an API, which makes the following API available to use within your Javascript code on the page:

uc.utils.popupLOV.item(itemName).setValueByReturn(newValue)

This function sets both the display & return value of the Popup LOV. If there are any items in the "Additional Output" attribute, they will also be set with the correct values.

Simply by running this action on page load and providing the affected Popup LOV item(s) in the "Page Item(s)" attribute, you are then able to use the above mentioned function anywhere in a JavaScript context in your page.

Important Note: this feature only works with a Popup LOV whose source is a dynamic "List of Values" (based on an SQL query)

In the below example you can see the following behaviour:

  1. the slider values correspond to the Customer ID's
  2. on change of the slider, we are calling the API function on the "Customer" Popup LOV with the selected ID value
  3. the popup LOV is then set with the correct display & return value
  4. all the "Additional Output" item values are updated on change as well

Clear the item(s)

When selecting the action "Add Clear Item Button(s)" - the plug-in will add a button to the items listed in the "Page Item(s)" attribute, or if none provided, to all Popup LOV instances on the page. It removes/clears the value from the Popup LOV instance and all the associated "Additional Output" items. Using the "Clear Icon" attribute you can also control the icon used for the button.

FAQ

  • Is there a simple way to add a "Clear button" to every Popup LOV instance in the entire application?

    Yes. Just add this plug-in on the Global Page (Page Zero), on Page Load, and leave the Page Item(s) attribute empty. This way, all Popup LOVs, in the entire application will be affected, whilst only having defined this plug-in once in your application.

  • Can I change the position of the clear button?

    No it's not possible to change the position. We did initially try giving you this feature but there were issues with the Universal theme and focus outlines and borders. Therefore we decided that it's best to display it properly and restrict the position to after the list button.

  • Can I set the display value of a (nested) Popup LOV in the "Additional Output" Items?

    No it's not possible to currently do this. The reason is that APEX is responsible for setting the values of these items, therefore it does not know about or use our API.