Adding Custom Fields to a Maximo Anywhere application.
Shane Howard 270000C70V Comments (2) Visits (12978)
Today I'm going to describe the process of adding a custom field to a Maximo Anywhere application screen. Although we build the applications out of the box, you still have control over what you see and what you display to your users on the device. I've created an attribute in the work order object called reviewed, we want to bring this over to our Maximo Anywhere Work Execution application on to our Work Order details screen to show who has reviewed the Work Order. This can be done with new work order attributes, pre-existing ones that don't exist in Maximo Anywhere already as well as ones from other objects by creating the relationship on the object structure.
We will start with the simple customization of adding a new field to the Work Execution Work Order Details screen.
Maximo OSLC Resources
When you create a new attribute on the WorkOrder object is should automatically be part of the OSLCWODETAIL object structure, because of this we can skip right to the OSLC Resources to map our attribute to be pulled down via the rdf puller. If your attribute is not part of the work order object, you will likely need to open up the OSLCWODETAIL object structure and create a relationship between the object your custom attribute is in and the WORKORDER Object. I kept it simple for now, if we need more details I can follow up in a later blog.
Once you select the Hierarchy Path the OSLC Resource Mappings table will populate with the current mapped resources at that level. Here will will add our attribute called REVIEWED, you can do this by clicking new row. Below is a screenshot and the values entered.
Attribute Name: Reviewed
OSLC Property Name: reviewed *Note this will be created as an OSLC common property if the name doesn't already exist.
OSLC Property Namespace: htt
Once done save the record and we can now move over to the Anywhere side.
Updating the OSLC Shape Documents.
Now that we have configured our OSLC Resources in Maximo we need to use the RDF Puller to update our shape documents. Because our attribute is in the WORKORDER object we don't need to modify the rdf puller xml and can just run it to bring down our shape. If you created a relationship to another object, for example the person object you need to add the following line to your
I ran my RDF puller using MobileFirst Studio as seen in the screen from below in the ant view, but you can also run it via the command line using the following command.
ant -f anyw
Replace the username and password with your Maximo user that can update the shapes.
Once your RDF puller completes successfully you can look at th
Updating the application artifacts to defined your attribute and add new field.
Our last step is to update the app.xml for our Work Execution application, you can find this under apps
Open your app.xml and search for <!--Work Order Resource--> under here you want to add your resource, below is the syntax I used.
<!-- Custom Attribute -->
Our resource attribute is 'reviewed' as defined in our describedByProperty , the label is what displays above the field and place holder is what is shown until data is entered.
Once your edits are done, save the file and run a build all from the command prompt or double click the build script from your ant view in MobileFirst Sutdio.
And the results
Once the applications are rebuilt and your wlapp files uploaded to MobileFirst your changes will be ready to push to the devices or preview via simulator. Following the steps in this document should result in the following field being added to your Work Execution Details view.
You can see the Reviewed By field with my name entered.
I hope this was informative and helps your Maximo Anywhere implementations, as always questions, comments or concerns please post below.