Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Min value from a lookupObjects

DavidBernardoSI1996
Contributor
September 19, 2023

Hello, I'm trying to select the Min value from an asset. I've done some tests to try and resolve the issue but I'm stuck at the point:

minValuePrint.png

The structure of data is the following:

Host -> Applications -> System Type -> SLA PAT (Days)

I'm trying to select the lowest value in SLA PAT (Days). In this case the Host has 2 Applications, their SLA values are 8 and 1, as you can see the logs, but when I try to log the min of them I get no result. Does anyone know how to get the min value here?

1 answer

0 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 19, 2023

Hi @DavidBernardoSI1996 

Please note there are brackets around the values when you logged the "SLA PAT (Days)" information.  That indicates this is an array, not a list.  And the min function works with a list.

I believe you can use split() to convert the array into a list, and then use the min function on the resulting values.

If that does not work, you may need an intermediate step of storing the array to a created variable first, and then using split on that variable.

Kind regards,
Bill

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events