Maximo Open Forum

 View Only
  • 1.  Automation Script

    Posted 02-08-2023 06:23
    Requirement:- in Asset > Type: FACILITIES  i use this type So (Linear?) checkbox will be automatically checked. 
    how can I do that using Automation Script? please suggest a good script.
    #Assets
    #Customizations
    #EverythingMaximo
    #Linear
    #MaximoApplicationSuite
    #MaximoUserGroups

    ------------------------------
    Rio Tripathi
    BGV
    ------------------------------


  • 2.  RE: Automation Script

    Posted 02-08-2023 08:00
    You can write an attribute launch point script on the ASSET.TYPE field so that when the type = 'Facilities', it will check the linear checkbox automatically.

    if mbo.getString("TYPE")== "FACILITIES":
        mbo.setValue("LINEAR", True,2)

    ------------------------------
    Subhransu Sekhar Sahoo
    Tata Consultancy Services
    ------------------------------



  • 3.  RE: Automation Script

    Posted 02-09-2023 12:35

    To condense Subhransu's answer a bit:

    mbo.setValue("LINEAR", (mbo.getString("TYPE") == "FACILITIES"))

    The use of the "2" parameter is referencing the psdi.mbo.MboConstants.NOACCESSCHECK constant and you should absolutely always use the constant instead of just the number.  I am not sure that linear is read-only, so in this case it may not be necessary.



    ------------------------------
    Jason VenHuizen
    Sharptree
    ------------------------------



  • 4.  RE: Automation Script

    Posted 02-14-2023 00:35

    How can I do that if I want to check multiple checkboxes in a single script?

    do have any idea?



    ------------------------------
    Rio Tripathi
    BGV
    ------------------------------



  • 5.  RE: Automation Script

    Posted 02-14-2023 08:25

    If you're setting different attributes with different values, the first attribute in the setValue examples above is the attributename. You would set it with the appropriate attributename that you're trying to set. You can have as many setValue as you need in a single script. I don't think there's a bulk way to set them all the same value but you could write your own loop to do it. Let's say you have 5 attributes that all need to be true, you could do something like:

    attributes=["attribute1","attribute2","attribute3","attribute4","attribute5"]

    for attribute in attributes:

        mbo.setValue(attribute,True)



    ------------------------------
    Steven Shull
    IBM
    ------------------------------