APEX: List of Values shared across various applications

0

When you are used to Designer 6.0 or up, you may be aware of shared or shareable components.  In ApEx Shared Components are available, too.

One specific object that is worthwhile sharing is the List of Values, LOV for short. The LOV has been known since the early Forms versions and these days it still exists. In ApEx 4.0 it is possible to create an LOV in one application and use it in others. Let’s suppose an application 100 and 200. 100 will serve as the central application that holds the core objects, LOVs in this case.

Define a number of LOVs, be it static or dynamic ones. Static LOVs contain fix predefined values, dynamic ones are basically fed by underlying tables, to be defined by the developer.  A classic example of where to store values for the LOVs is the (well-) known CG_REF_CODES table, though LOVs are not restricted to focus on this table.

Let’s assume that an LOV was defined in application 100, and we now want to use an LOV from application 100 in our other application 200. Within application 200 we have to move to the Shared Components environment.

  • Next, click on List of Values in the User Interface box.
  • Click on the yellow Create button, in the top right direction.

You will be presented with the following screen:

Select ‘As a copy of an Existing List of Values’.

Press the Next button.

In the screen as displayed below you are prompted to select an existing (other) application from where the existing LOV is to be copied:

Select the relevant application by highlighting it, and press Next.

You will be presented with a list of available LOVs from the previously selected application. At the top of the columns you will consecutively see the following names: Application, From name, To name and Copy?. The Application representing the source application, followed by the name of the LOV in that application. The To name can hold the name of the LOV in the destination application. The pop list in the Copy? column has the values No, Yes and Copy and Subscribe available.

For the purpose of this article, please set this value to Copy and subscribe.

Press the yellow button, named Copy List of Values.

In the overview of your LOVs you will be able to see what the sources are of your LOVs, see the image underneath:

The 2 LOVs on the left are copied (and subscribed) from another application. The LOV_YN is “original”, meaning that it was created in the current application. If you want to see where your LOVs are “inherited” or “copied” from press the Subscription button at the top of the screen. The LOVs that are not displayed on that list will not have been copied from another application:

The advantage of this is that you don’t need to re-define an LOV that exists in another application. You do need to be aware that somebody in charge of the “source” application may change or delete the inherited LOV, the LOV that you subscribed to.

When the person in charge of application 40000 (the application that we copied the LOVs from) wants to verify that his or her LOVs are being referenced this can be done as follows:

Please check the breadcrumbs in the picture; you can follow these to reach the relevant page in your own environment.

The LOVs listed from application 500 use this LOV, which is defined in application 40000.

Hopefully this entry in the AMIS technology blog helps you. Should you have any comments then please feel free to leave them here. Any related problems reported, feedback or questions asked will be addressed as soon as possible.

Thank you for your interest.

Share.

About Author

Consultant, trainer, release manager, people manager, coach, technical writer.

Comments are closed.