Maximo

 View Only
Expand all | Collapse all

Make Work Order Specification Attribute Read Only

  • 1.  Make Work Order Specification Attribute Read Only

    Posted Tue October 18, 2022 12:15 PM
    Hi All,

    I have a requirement to make the ALNVALUE field on a (work order) specification attribute Read Only based on a value in a related mbo. I have an automation script that appears to be working fine, in as much as it is identifying the correct ALNVALUE to make read only and is executing:

    mbo.setFieldFlag("ALNVALUE", MboConstants.READONLY, True)

    However, the field is still editable? It would appear that there is something within Maximo that is overriding the setting as fields (ALNVALUE / NUMVALUE) are made read only based on the attribute data type that is expected...

    Does anyone know if it is even possible and how I might go about this please?

    Many thanks,

    Chris.

    ------------------------------
    Christopher Price
    Solutions Architect
    South East Water
    Snodland
    ------------------------------

    #AssetandFacilitiesManagement
    #Maximo


  • 2.  RE: Make Work Order Specification Attribute Read Only

    Posted Wed October 19, 2022 01:44 AM
    Hi Chris,

    For example: parent is WORKORDER , child is WORKORDERSPEC , asset attribute is ATTR1
    1. Create a relationship : 
      • Relationship name: WOSPECATTR1
      • Parent: WORKORDER
      • Child: WORKORDERSPEC
      • WhereClasue: wonum= :wonum and classstructureid = :classstructureid and siteid=:siteid and assetattribute = 'ATTR1'
    2. Create object launch point on WORKORDER object and event on Initialization
    3. woSpecSet = mbo.getMboSet("WOSPECATTR1")
      if woSpecSet.isEmpty() == False:
          if <write your condition>:
              woSpecSet.setFlag(mbo.READONLY,True)
          else:
              woSpecSet.setFlag(mbo.READONLY,False)


      Hope it will help.



    ------------------------------
    [Srikanth] [Narala] [Maximo Specialist]
    [Melbourne] VIC
    ------------------------------



  • 3.  RE: Make Work Order Specification Attribute Read Only

    Posted Wed October 19, 2022 05:58 AM
    Hi Srikanth,

    Thank you for the fast reply.

    Following your example and setting the read only flag at the mbo level (instead of at the field level) has resolved my issue.

    Many thanks again,

    Chris.




    ------------------------------
    Christopher Price
    Solutions Architect
    South East Water
    Snodland
    ------------------------------