The workorder assignment manager already has a built in color code scheme where it changes the font color of the rows depending on what the priority of the workorder is. We can expand this functionality to other modules as well such as the Workorder Tracking module. We can change the row color of each workorder depending on what status it is in or what priority it ranges from. Here is a screenie of what the we are trying to achieve for the end result.
Workorder Tracking Color Code
So in order to color code these workorder by status type you will have to go and modify the XML file found in theApplication Designer.
First, open up the Application Designer and open the WOTRACK module. From there, export the XML file and save it to your desktop. Open up the file in notepad or your favorite XML editor, and search for this:
<tab id="results" default="true" label="List" type="list">
This is the tab that contains the table for the workorder list. Now add the following snippet just before the </tablebody>:
<displayrule id="exactrule1" dataattribute="status">
<exact id="exact1" value="APPR" classname="rowcolor_calcpriority_2" />
<exact id="exact2" value="WAPPR" classname="rowcolor_calcpriority_4" />
<exact id="exact3" value="COMP" classname="rowcolor_calcpriority_6" />
<exact id="eaxct5" value="INPRG" classname="rowcolor_calcpriority_9" />
</displayrule>
You have now added a display rule that tells Maximo for all workorder status’ that are in APPR, WAPPR, COMP, or INPRG, add a color code accordingly. The ‘classname’ attribute specifies what CSS class it will use for the color. These CSS classes are predefined and you can look them up in the maximo.css file located at “ibm/SMP/maximo/applications/maximo/maximouiweb/webmodule/webclient/css”.
After you have saved your changes, import the modified XML file back into Application designer and save. Now go check out the cool new color scheme.
Now, this display rule works with exact values but what if you wanted to do a range of values such as workorder priority? You can do that as well. Add the following code to do just that…
<displayrule id="displayrule1" dataattribute="wopriority">
<range id="range1" lower="0" upper="2" classname="rowcolor_calcpriority_2" />
<range id="range2" lower="3" upper="4" classname="rowcolor_calcpriority_4" />
<range id="range3" lower="5" upper="6" classname="rowcolor_calcpriority_6" />
<range id="range4" lower="7" upper="8" classname="rowcolor_calcpriority_8" />
<range id="range5" lower="9" upper="9" classname="rowcolor_calcpriority_9" />
</displayrule>
No comments:
Post a Comment