Maximo Open Forum

 View Only

 Conditional UI to Make Work Order Task fields read-only in WOTRACK Plans Tab

  • Everything Maximo
Jared Schrag's profile image
Jared Schrag posted 08-24-2023 20:31

I've made the following configurations:

  • Created new Condition in Conditional Expressions Manager
    • ConditionNum: WOWAPPR
    • Type: EXPRESSION
    • Condition: 
      :status IN (SELECT d.value FROM synonymdomain d WHERE d.domainid = 'WOSTATUS' AND d.maxvalue = 'WAPPR')
    • Evaluate Always: Yes/Checked
  • Added new SigOption for the WOTRACK application
    • Option Name: WO_RO_NOTWAPPR
    • Description: Conditional UI to set field inputmode to readonly when WO is not in a WAPPR equivalent status
  • Security Groups:
    • New SigOption is granted to the MAXEVERYONE Security Group for the Work Order Tracking application
  • Application Designer: Modified the WOTRACK application
    • In the main tab, textbox properties for a field on the WORKORDER object, in the Advanced tab in the properties dialog:
      • Set the new SigOption on the control
      • Clicked on the Conditional UI button, in the Conditional UI dialog:
        • Selected the MAXEVERYONE Security Group
        • Selected the new Condition WOWAPPR
        • For the condition evaluation of false, set the inputmode property to the value readonly

This configuration seems to work as expected, the targeted field is readonly in the main tab when the Work Order is in any status other than any equivalent of WAPPR. I figured it would be useful to make the same configuration in the Plans tab, in the Table Details section of the Tasks table. I expected the Status of the Task to determine if the inputmode of that WOACTIVITY field should be set to readonly (when the Task status is any value other than any equivalent of WAPPR). However, I find that it doesn't seem to have any effect on the inputmode in that table details section.

Have I missed something here in using Conditional UI?

Many thanks for your replies!

- Jared

Julio Hernandez's profile image
Julio Hernandez

Hi Jared,

Did you populate the SigOption Data Source (sigoptiondatasrc in the XML)?  That controls from where the condition is evaluated.  "MAINRECORD" refers to the WO.  I believe it is supposed to default to the current context but that doesn't always work.  Try setting it to the ControlID of the "Tasks for WO..." table.

Jared Schrag's profile image
Jared Schrag

@Julio Hernandez Your suggestion was effective when I employed it for the Children of Work Order table! Thank you! Unfortunately, I did the same approach for the Tasks for Work Order table, ensuring to use the Control ID for the Tasks table control in the SigOption Data Source field, as suggested. Those still do not behave according to the Status changes on the Tasks. I'm still playing around with it.

Jared Schrag's profile image
Jared Schrag

I found an alternative solution for the fields on the WOACTIVITY in the Tasks for Work Order table in the Plans tab. I implemented an Automation Script with an Attribute Launch Point for the field(s) being targeted (launching on Initialize Value event). In the Automation Script, I assess the MBO internal status value:

mbo.getInternalStatus()

If the internal status value is not equal to 'WAPPR' then I call:

mbo.setFieldFlag('<fieldname>', MboConstants.READONLY, True)