Maximo

 View Only
  • 1.  Read domain values into autoscript

    Posted Wed August 03, 2022 12:41 AM
    hello all,

    I have an ALN domain called 'BOEDIR', and the domain is not linked to an attribute.
    Is it possible for us to  read the values of this domain into an auto-script (any object launch point)?

    Basically, I am trying to use this domain as a global list that I could call from multiple auto-scripts, and do value comparisons.


    Thanks,

    ------------------------------
    KKunnuthara
    ------------------------------



    #AssetandFacilitiesManagement
    #Maximo
    #MaximoIntegrationandScripting


  • 2.  RE: Read domain values into autoscript

    Posted Thu August 04, 2022 11:53 AM
    Any of the normal means for opening an MboSet will work on the ALNDOMAIN object. Here's one example.

    from psdi.mbo import SqlFormat
    sf = SqlFormat("domainid = 'BOEDIR' and value = :1")
    sf.setObject(1, "ALNDOMAIN", "VALUE", "your value that you want to check for")
    
    alnSet = mbo.getMboSet("$findinBOEDIR", "ALNDOMAIN", sf.format())
    if alnSet.getMbo(0):
        service.log("value found in domain")
    else:
        service.log("value not found in domain")​


    ------------------------------
    Blessings,
    Jason Uppenborn
    Sr. Technical Maximo Consultant
    Cohesive Ontracks
    ------------------------------



  • 3.  RE: Read domain values into autoscript

    Posted Thu August 04, 2022 10:11 PM
    Thanks very much @Jason Uppenborn, that's exactly what I was looking for :)​​

    ------------------------------
    KKunnuthara
    ------------------------------