Monday, 1 May 2017

Shortest Way to Create a Custom Lookup (MBONAME attribute in xml) | IBM Maximo

1.Insert this into looksup.xml
<table id="custum_lookup" inputmode="readonly" mboname="custom_object" selectmode="single">
<tablebody displayrowsperpage="20" filterable="true" filterexpanded="true" id="custum_lookup_lookup_tablebody">
<tablecol dataattribute="description" id="custum_lookup_lookup_tablebody_col_2" mxevent="selectrecord" mxevent_desc="Go To %1" sortable="true" type="link"/>
</tablebody>
</table>

2. Add this table id (custum_lookup) as lookup in application designer.
3. Add source and target in Edit Lookup Map.

We are done :)
-------------------------------
another example with whereclause


1.Insert this into looksup.xml
<table id="OGDC_COMM_person" inputmode="readonly" mboname="person" selectmode="single" whereclause="LOCATIONSITE IN (select locationsite from person where personid=:USER)">
<tablebody displayrowsperpage="20" filterable="true" filterexpanded="true" id="OGDC_COMM_person_lookup_tablebody">
<tablecol dataattribute="personid" id="OGDC_COMM_person_lookup_tablebody_col_2" mxevent="selectrecord" mxevent_desc="Go To %1" sortable="true" type="link"/>
<tablecol dataattribute="displayname" id="OGDC_COMM_person_lookup_tablebody_col_5" mxevent="selectrecord" mxevent_desc="Go To %1" sortable="true" type="link"/>
<tablecol dataattribute="title" id="OGDC_COMM_person_lookup_tablebody_col_6" mxevent="selectrecord" mxevent_desc="Go To %1" sortable="true" type="link"/>
<tablecol dataattribute="department" id="OGDC_COMM_person_lookup_tablebody_col_7" mxevent="selectrecord" mxevent_desc="Go To %1" sortable="true" type="link"/>
<tablecol dataattribute="location" id="OGDC_COMM_person_lookup_tablebody_col_8" mxevent="selectrecord" mxevent_desc="Go To %1" sortable="true" type="link"/>
<tablecol dataattribute="locationsite" id="OGDC_COMM_person_lookup_tablebody_col_9" mxevent="selectrecord" mxevent_desc="Go To %1" sortable="true" type="link"/>
<tablecol dataattribute="locationorg" id="OGDC_COMM_person_lookup_tablebody_col_10" mxevent="selectrecord" mxevent_desc="Go To %1" sortable="true" type="link"/>
</tablebody>
</table>
2. Add this table id (custum_lookup) as lookup in application designer. 

No comments:

Post a Comment