Adding a domain to a field in Maximo Mobile
Mhohmann 270000FMSC Visits (9129)
A lot of people add new domains to fields in Maximo Base Services and want to know if they can also be added to Maximo Mobile.
The answer to that is yes, I will outline the steps I have performed to add a new field and domain to the asset screen in the Mobile Asset Manager application.
The prerequisite is to have added a new attribute or use and existing attribute in Database Configuration, Add a new domain in Maximo using the Domains Application You will also want to use Application Designer to add the field to the Asset screen in Maximo.
For my example I am using the field EQ1 this is an extra field on the Asset table. I have created a new Domain called EQ1 and added it to the Asset screen.
Using a text editor, I use Notepad ++ for making the changes to the mobileam.xml file.
Open the mobileam.xml and in the mobilembos section, Under the mobilembo for asset we need to add our new field EQ1. I like to add a commented out line, above any change I make, so I can document changes that have been made, It also makes it easier to search on any changes you have made. To comment out a line add <!-- To the front and back of your comment -->
The <mobilembos> sections is the first section in the xml file, You will see it once you open the file using your text editor.
<mobilembo name="ASSET" mboname="ASSET" type="workset" usequeries="true" quer
Under the mobilembo for asset we add a line for our new field
<!-- Mike Added mobilemboattribute EQ1 -->
<mobilemboattribute name="EQ1" mboa
Next we will need to add our new Domain.
At the bottom of the mobilembo section you will see where the existing Domains have been added, Here we need to create our new Domain EQ1
<!-- Mike added domain -->
<mobilembo name="EQ1" mboname="ALNDOMAIN" domain="true" usequeries="false" mult
<mobilemboattribute name="ORGID" mboa
<mobilemboattribute name="SITEID" mboa
<mobilemboattribute name="VALUE" mboa
<mobilemboattribute name="DESCRIPTION" mboa
<mobilemboattribute name="DOMAINID" mboa
Once the Domain has been added we can move to the Lookups section of the mobileam.xml, Here we will add a lookup for our domain this will also be associated to the mobileattribute EQ1 we just added
You can search for <!-- Lookups --> to find the lookups section of the xml file
I have added my new lookup at the bottom of the lookups section
<!-- Mike added EQ1 domain lookup -->
<lookup id="eq1lookup" datasrcname="EQ1" mobilembo="EQ1" retu
<table id="eq1lookuptbl" rowsperpage="10" tool
<tablecolumn id="eq1lookup1" displaymode="fixed" label="Value" data
<link id="eq1lookup1L" event="multiselect" data
<tablecolumn id="eq1lookup2" data
After we add the lookup we then add the new field EQ1 and domain EQ1 to the Asset screen, Lets now go to the screens section of the mobileam.xml
You can search on <page id="assetmain" this will take you to the section for the Asset main screen.
<page id="assetmain" label="Asset" data
Here we will add the textbox for our new field and associate the dattaattribute, lookup and domain. The label can be any value you want displayed on the screen,
The fields display on the screen in the order they are listed in the page id section of the xml file. You also need to verify that the textbox id is unique.
<!-- Mike Added EQ1 and TEST1 -->
<textbox id="assetdet82" dataattribute="EQ1" lookup="eq1lookup" domain="EQ1" label="EQ1" doma
Once this is done you will need to run importall, packagemobile, delete the /db folder from mobile, Once you sign in to mobile let the software update run so that you have the new mobileam.jar file that was created. When you go to the Asset screen you will now see your new field EQ1 with the domain lookup