The conditional user interface expression in the Maximo system can be expressed using a combination of object structures, object attributes, and automation scripts. The following steps can be followed to create a conditional user interface expression:
Identify the object structure and object attributes on which the conditional expression needs to be applied.
Create an automation script that contains the conditional expression using the scripting language supported by Maximo, such as Python or JavaScript.
In the automation script, use the SetValue method to set the visibility or enabled status of the UI control based on the evaluation of the conditional expression.
Reference the automation script in the appropriate event handler for the UI control, such as the OnRender event for a field or the OnLookup event for a lookup control.
Save and deploy the changes to the Maximo system.
Example:
Suppose we want to display a custom field called "CustomField" on the work order form only when the work order type is "PM". We can follow the below steps to express the conditional user interface expression in the Maximo system:
Identify the object structure "WORKORDER" and object attribute "WORKTYPE" on which the conditional expression needs to be applied.
Create an automation script that contains the conditional expression.
from psdi.util import MXException
if mbo.getString("WORKTYPE") == "PM":
mbo.setValue("customfield", "sample value", 11L)
else:
mbo.setValueNull("customfield", 11L)
The above script sets the value of "CustomField" to "sample value" if the work order type is "PM". Otherwise, it sets the field to null which will hide it from the UI.
Reference the automation script in the appropriate event handler for the UI control. In this case, we need to reference this script in the OnRender event of the "CustomField" field.
Save and deploy the changes to the Maximo system. Now, when a user selects a work order type as "PM", the "CustomField" will be displayed on the work order form. Otherwise, it will be hidden.
Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss
Asked: 2022-08-29 11:00:00 +0000
Seen: 14 times
Last updated: Sep 27 '21
How can a list be sorted alphabetically within a console application?
What is the process for generating a dynamic subdomain/URL using vue.js?
How can the style of the loader be modified while the form submission is being processed?
I'm attempting to develop a Javascript-based comments section for my website.
What are some feasible methods to enable MIDI file playback on a web browser?
How can I resolve the issue of being unable to use Fetch to POST an array of Selected Checkboxes?
What is the method to hide the scroll button when reaching the bottom?
What is the process of using a custom nunjucks filter to filter collections in an eleventy template?