Fetching Dynamic Lookup Lists via Attribute Launch Point with Retrieve List Event

March 29, 2017 Yalcin Kumbasar

In previous versions of Maximo/ICD, we used to write Java codes or create table domain of domains with case statement in list where clause in order to fetch lookup lists dynamically. Then, conditional domains were introduced, but they caused performance issues for large lists and were inefficient for some cases. In latest version (7.6), we have the "Retrieve List" event for Attribute Launch Points which is perfect for this task. Let me go through an example to explain:


AIM: Fetching different person groups for different sites for a custom field for groups


0) Assume that there are many sites corresponding to cities such as IZMIR, LONDON, PARIS, etc.

1) Create as many as needed table domains of person groups, namely GR-IZMIR, GR-LONDON, GR-PARIS, GR-COMMON, GR-ALL. They will be used like cases in a switch statement.

2) Go to Database Configuration application and create a custom field same as PERSONGROUP.PERSONGROUP field. Give it the largest table domain (GR-ALL) including all groups needed. Later, define the lookup mapping of custom field using the edit lookupmap button (requires dbconfig and restart respectively)

3) Write the Automation Script below for attribute launch point with Retrieve List event.

# select domain of person groups with respect to cities (sites) using a dictionary
def selectDomain(value):
    return {
        'IZMIR'  : 'GR-IZMIR',
        'LONDON' : 'GR-LONDON',
        'PARIS'  : 'GR-PARIS'
    }.get(value, 'GR-COMMON')
# {}.get() function sets the default value for any other city (site)

# fetch the domain by comparing site (city) of record to the dictionary
siteid = mbo.getString("SITEID")
domainid = selectDomain(siteid)

4) Go to Application Designer, add custom field to your application and write the lookup property for field as "PERSONGROUP".

NOTE: As I remember it did not work with a custom lookup and had shown invalid binding. It worked with the default lookup for person groups which is PERSONGROUP. If it was an ALNDOMAIN, I would prefer its default lookup instead of "VALUELIST".


Previous Article
10 Minute Tip - Scheduled reports sending multiple emails

Today we will discuss a couple of reasons why your users may be receiving multiple emails for a single sche...

Next Article
Maximo Asset Management Interim Fix 004 released

The Interim Fix (IFIX) is available at Fix Central.   As with all IFIXes, MAM 75011 IFIX 004 is cumulative ...


Want our latest news? Subscribe to our blog!

Last Name
First Name
Thank you!
Error - something went wrong!