On the set, there are some functions such as sum(), min(), max(), etc. that get the appropriate values for the dataset provided. See: https://bportaluri.com/wp-content/MaximoJavaDocs76/psdi/mbo/MboSet.html
The SUMF and other formula functions you probably can utilize in a script if you declare them appropriately and call the underlying functions.
If it's not available as a formula, you would need to iterate through the set and execute the necessary logic depending on what you're trying to do.
------------------------------
Steven Shull
IBM
------------------------------
Original Message:
Sent: 12-21-2021 00:33
From: User 1972
Subject: Aggregate records via automation script method
MAM 7.6.1.2:
Are there Java methods that can be used in autoscripts for the purpose of aggregating records?
For example, use a simple method to SUM() the ACTTOTALCOST (non-persistent WO field) for a set of WOs.
Similar to what we have for formulas:
- com.ibm.tivoli.maximo.expression.SUM
- Syntax: sum$<relationship>$<related attribute>
- Example: sum$workpack$acttotalcost
- com.ibm.tivoli.maximo.expression.SUMF
- Syntax: SUMF("relation","attr_to_sum","time_line_attr",DURATION(..))
- Example: SUMF("openwo","wopriority","statusdate",DURATION(10,0,0,0,0,0))
Thanks.
#Administration
------------------------------
User 1972
------------------------------