Maximo

 View Only
  • 1.  Maximo Conditional UI Expressions

    Posted Thu May 30, 2024 01:30 PM
    Edited by SANJAY PATIL Thu May 30, 2024 01:38 PM

    Questions

    Under the Work Order Assignments Tab:
    The field is displayed under the detail section for Assignments (FLD1), and it is a part of the UI Conditional Rule action (e.g. Make this FLD1 Required). The field displayed on the Assignment List has this UI condition (FLD2). So, when user, without opening the detail section, attempt to modify the value on the Assignment List (FLD2), the UI Conditional Rule doesn't fire. However, if Assignment Details are open, then the UI rule fires.

    No error in the log.

    Another observation is, when I use this XML Table attribute property on Assignment Table in UI Presentation, 
    Rowdetailsexpanded="true"
    e.g. <table id="assignment" label="Assignment" relationship="ABCD" rowdetailsexpanded="true">

    I expected, by default all assignments should display the detail section opened. But this is not the case. If you open one assignment details section in one session and then within the same session if you move around different applications and come back to Assignment, then you will see all subsequent assignment records will show the details section opened. But when you log out and log back in, you will once again see the Assignment Details section closed. 


    Just looking for other Maximo practitioners' thoughts on this, please.



    ------------------------------
    SANJAY PATIL
    ------------------------------



  • 2.  RE: Maximo Conditional UI Expressions

    Posted Fri May 31, 2024 02:42 AM

    If I understood you correctly, yes it can be. Conditional UI rules apply to the field accessed via UI. So, you have your details section closed it can not be work. 

    Anyway, try first: 

    set for table with assignments tag rowdetailsexpanded="true" (or in UI it is on the "advanced" tab in table element properties) 

    Try to set on fld sigoption data source as table id 

    SIGOPTIONDATASRC = "[asstigments table id]"

    And the most powerful (from my point of view) is to create an automation script on INIT for the assignment object and put all logic there like that:

    from psdi.mbo import MboConstants
    
    if (....) :
        mbo.setFieldFlag("FLD01", MboConstants.READONLY, False);
        mbo.setFieldFlag("FLD02", MboConstants.REQUIRED, True);
    else :
        mbo.setFieldFlag("FLD01", MboConstants.READONLY, True);
        mbo.setFieldFlag("FLD02", MboConstants.REQUIRED, False);




    ------------------------------
    Andrey Ilinskiy
    Handz.on
    https://www.on.de/
    München
    ------------------------------



  • 3.  RE: Maximo Conditional UI Expressions

    Posted Fri May 31, 2024 02:46 AM

    If you go to the automation scripts way, I suggest also adding validations (if it is required):

    1. Is it a new object or not
      mbo.toBeAdded()
    2. Is object opened in UI interface or not:
    from psdi.common.context import UIContext
    
    ..
    
    UIContext.getCurrentContext() is not None


    ------------------------------
    Andrey Ilinskiy
    Handz.on
    https://www.on.de/
    München
    ------------------------------



  • 4.  RE: Maximo Conditional UI Expressions

    Posted Fri May 31, 2024 03:02 PM

    Thanks for the response, Andrey. I am not using any automation script and I am trying with Conditional UI to make FLD1 required. This not a static event like Init of assignment which is going to occur all the time when you load assignment on UI. 

     If and only if User modifies the FLD2 value and that value is only is specific value, then I want to make FLD1 as required.

     I am still digging why the rule applied on FLD2 is not finding FLD1 when it's there at runtime. If you write an automation script on FLD2 and read FLD1, you will see not null reference at run time. Not DB call.

    Let me think on SIGOPTIONDATASRC  and will come back to you.

    Once again thank you.



    ------------------------------
    SANJAY PATIL
    ------------------------------