Skip to main contentMAF Configuration Practices

Create Priority Lookup in Techmobile

About this task

This guide instructs on how to add new priority domain to the system and use it to prioritize work orders.

Procedure

Step 1: Create a query for the MXAPINUMERICDOMAIN object structure in Object Structures, click on Query Definition, add a new line where Query Type = osclause, Query Name=TRGPRIORITY and set the query= domainid=‘TRG_PRIORITY’.

Query Definition

Step 2: Create a datasource, within the scope of the application, to receive the data from the query created above. Search for “Maximo Datasources” in the xml and add the datasource.

<maximo-datasource id="trg_WoPrioritylookupDS" lookup-data="true" object-structure="mxapinumericdomain" offline-immediate-download="true" saved-query="TRGPRIORITY" selection-mode="single">
<schema id="trg_p45xd">
<attribute name="value" unique-id="true" id="trg_ej7z_"/>
<attribute name="valueid" id="trg_d899w"/>
<attribute name="description" id="trg_r5v9p"/>
<attribute name="domainid" searchable="true" id="trg_rawkp"/>
<attribute name="siteid" id="trg_d4w_g"/>
<attribute name="orgid" id="trg_qqny3"/>
</schema>

Step 3: Create a domain with the name “TRG_PRIORITY” and associate it with the datasource created “trg_WoPrioritylookupDS” in the app.xml, it must be placed before id=“synonymdomainData”. Search for id=“trg_WoPrioritylookupDS” and add the dialog.

The order matters. The datasource referenced in the lookup should be declared before using it.

<dialogs id="applookups">
<lookup id="trg_woPriorityLookup" datasource="trg_WoPrioritylookupDS" lookup-attributes="{['value','description']}" search-placeholder="Search WO Priority"/>
</dialogs>
<smart-input label="Priority" hide-step-buttons="true" placeholder="Enter {page.state.minPriority} to {page.state.maxPriority}" value="{dsWoedit.item.wopriority}" on-blur="validateFields" min="{page.state.minPriority}" max="{page.state.maxPriority}" enable-lookup-buttongroup="true" input-kind="ALN" lookup="trg_woPriorityLookup" select-lookup-attribute="value" id="yqkzy"/>
<smart-input label="Priority" hide-step-buttons="true" placeholder="Enter {page.state.minPriority} to {page.state.maxPriority}" value="{dsCreateWo.item.wopriority}" on-blur="validateFields" min="{page.state.minPriority}" max="{page.state.maxPriority}" id="j8265" enable-lookup-buttongroup="true" input-kind="ALN" lookup="trg_woPriorityLookup" select-lookup-attribute="value"/>