Forums

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

I want to get the total value of a variable with smart value

青山 明
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 Champions.
July 7, 2023

In JSM automation, if the value of variable A is the following example,
Is it possible to get the sum of the values of variable A as a smart value? In this case the total value is 10.
A = 2,2,3,2,1

1 answer

1 accepted

4 votes
Answer accepted
Sayed Bares [ServiceRocket]
Community Champion
July 7, 2023

@青山 明 what is 2,2,3,2,1? is it a String or a List?

  • If List you can just use {{A.sum}}
  • If String you can just use {{A.split(",").sum}}
青山 明
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 Champions.
July 7, 2023

IT is a string. As a result of verifying with two methods, it was NG. Could not get value.

青山 明
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 Champions.
July 7, 2023

I'm sorry, it was OK when I changed the variable to an integer attribute.

Suggest an answer

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

Atlassian Community Events