Maximo

Maximo

Come for answers, stay for best practices. All we're missing is you.

 View Only
  • 1.  Formulas: Conditions can be any valid condition that Maximo allows, including SQL expressions

    Posted Mon August 16, 2021 09:13 PM

    The original Maximo formulas PDF says:

    "...conditions can be any valid condition that Maximo allows, including SQL expressions."

    Would someone mind explaining what that means? I don't think I understand how to use SQL expressions in formula conditions.

    Thanks.

    #AssetandFacilitiesManagement
    #Maximo


  • 2.  RE: Formulas: Conditions can be any valid condition that Maximo allows, including SQL expressions

    Posted Mon August 16, 2021 09:14 PM
    Edited by System Admin Wed March 22, 2023 11:51 AM


  • 3.  RE: Formulas: Conditions can be any valid condition that Maximo allows, including SQL expressions

    Posted Tue August 17, 2021 07:55 AM
    Formulas allow you to utilize existing conditions defined in Conditional Expression Manager. These have to return a true/false and are often SQL conditions. For example, if you go to conditional expression manager the logic for the condition ASSETMETER is "exists (select 1 from assetmeter where assetnum = :assetnum and orgid =:orgid)" This will use the data on the record you're starting from (IE ASSET or WORKORDER) and look to see if there is a record in the assetmeter table and return true/false back to the formula by executing a SQL query. Then your logic in the IF statement in the formula would take effect.

    Conditional expressions can also be written in java or an automation script (by referencing a special java class that invokes the automation script custom condition launch point). In those cases they would not be restricted to SQL expressions. I would imagine you could invoke those too with formulas, though I haven't tried. 

    To me, this feature is about supporting existing logic you may have already defined in conditional expression manager while also enabling support for some conditions that the formula framework didn't support today (such as comparing ALN values).

    ------------------------------
    Steven Shull
    ------------------------------



  • 4.  RE: Formulas: Conditions can be any valid condition that Maximo allows, including SQL expressions

    Posted Mon November 08, 2021 12:29 AM
    Edited by System Admin Wed March 22, 2023 11:55 AM

    Hi Steven,
    Regarding this line: "...referencing a special java class that invokes the automation script custom condition launch point."
    Do you happen to know what that Java class is called?
    Thanks.




  • 5.  RE: Formulas: Conditions can be any valid condition that Maximo allows, including SQL expressions

    Posted Mon November 08, 2021 08:03 AM
    The class is com.ibm.tivoli.maximo.script.ScriptCustomCondition

    And the value is either the script name or the scriptname:launchpoint

    IE EMXWOSCRIPT:EMXWOLAUNCH

    I was a bit surprised this isn't in the knowledge center. There's a PDF that covers this on the Integration & Scripting community (current link: https://higherlogicdownload.s3-external-1.amazonaws.com/IMWUC/a5f8259a-b055-73d0-993e-ce349111a62b_file.pdf?AWSAccessKeyId=AKIAVRDO7IEREB57R7MT&Expires=1636380137&Signature=W%2F3Yn47M9uP5AwGceHh3RZI6dZA%3D).

    ------------------------------
    Steven Shull
    ------------------------------



  • 6.  RE: Formulas: Conditions can be any valid condition that Maximo allows, including SQL expressions

    Posted Mon November 08, 2021 03:12 PM
    Related to ScriptCustomCondition:

    Automation Script for Conditional Expressions
    Workflow Tip, Script Conditions