IBM Support

Associating lookups in Maximo using the MAXLOOKUPMAP table

Question & Answer


Question

How do I associate a lookup using the MAXLOOKUPMAP table.

Answer

There are different ways to associate a lookup in Maximo.
This Tech Note provides details on using the MAXLOOKUPMAP table to create the association.
You can use a Table Domain and this method is documented in Tech Note # 21261925

The Maximo framework figures out the foreign key mapping from one of three ways:
Attribute mapping defined in the field validation class as associated to the attribute in Database Configuration.
Attribute mapping registered in the MAXLOOKUPMAP table.
The automated matching process using the primary keys of the source object ( applink object or lookup object) and the fields in the target object.

Attribute mapping using a field validation class would require coding and will not be covered in this document.

The Maximo framework uses a series of rules to figure out the mapping of fields to set values.
First the Maximo framework looks through the primary key column names of the source mbo and tries to match columns with the same name in the target mbo.
If they match then it is considered a valid match and the values of the source columns will be set to their same name counterparts.
If the names match, but they are not the name of the field in the lookup, Maximo will then look at the Same As Object and Same As Attribute values from the launch field as set in Database Configuration for that attribute.
If a match cannot be made an exception is thrown and the association needs to be made either through a validation class reference, or through the use of the MAXLOOKUPMAP table.

To set up a MAXLOOKUPMAP record for associating a lookup, you need to look at the columns of the MAXLOOKUPMAP table so you know what to populate them with.

The primary key of the table is TARGET, LOOKUPATTR, SOURCE, SOURCEKEY.

TARGET – The target object name which is the object the field launching the lookup exists in.
LOOKUPATTR – The attribute name for the field for which the value from the lookup will be returned to.
TARGETATTR – The target field in the target object to which the value is set, either manually or by the lookup selection.
SOURCE – The object the lookup or applink is set against. The object containing the values for the lookup.
SOURCEKEY – The source field from which the lookup value is selected.
SEQNUM – The sequence in which the multi-key lookup sets the target attributes.
ALLOWNULL – When a LOOKUPATTR is being directly set in an application, this indicates whether the attribute can be null or not. The ALLOWNULL attribute is not used during a multi-key lookup but is used when the LOOKUPATTR listed in the MAXLOOKUPMAP table is being directly set with a value such as a user directly typing a value in the field.
If any of the attributes other than LOOKUPATTR listed in the TARGETATTR column are set to ALLOWNULL false, then they have to be set (have a value) before setting the LOOKUPATTR field. If more than one attribute with ALLOWNULL set to false exist, then those fields must all be set before the LOOKUPATTR field can be populated.

Note: the LOOKUPATTR is the field the lookup is launched from and in most cases will be the same as the TARGETATTR which is used for validation for manually typed entries in the field.

Any entries made to the MAXLOOKUPMAP table need to be done using a SQL tool.
Once the entries are made and commited, the Maximo application server will need to be restarted for the changes to take effect.

Note: In version 7 these settings can be made in Database Configuration.
Select the object the attribute exists on.
Select the attribute in the Attribute tab.
On the right hand side of the attribute record, there is a Edit Lookup Map icon and the MAXLOOKUPMAP values can be entered using this option.

[{"Product":{"code":"SSLKT6","label":"IBM Maximo Asset Management"},"Business Unit":{"code":"BU055","label":"Cognitive Applications"},"Component":"Domains","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"6.2.1;6.2.2;6.2.3;6.2.4;6.2.5;6.2.6;6.2.7;6.2.8;7.1.1;7.5;7.6","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}},{"Product":{"code":"SSLKTY","label":"Maximo Asset Management for IT"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":null,"Platform":[{"code":"","label":"All"}],"Version":"","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}},{"Product":{"code":"SSWK4A","label":"Maximo Asset Management Essentials"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":null,"Platform":[{"code":"","label":"All"}],"Version":"","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Document Information

Modified date:
17 June 2018

UID

swg21393343