Multi-stage calculations - Cloud Automation

Chris F April 17, 2023

Hi team,

I'm trying to automate the following calculation: (field 1 x field 2) + field 2

 

I've set up a global automation to calculate the first part (field 1 x field 2) but I'm unable to then take that output and use it for the follow up calculation.

I've tried splitting it into a second automation rule but that hasn't worked, so I'm wondering:

1. Is there a way to run step-by-step calculations in 1 rule

2. I couldn't find any documentation around the order at which global automation rules run (i.e Rule 1 runs and then Rule 2 etc). Is this documented anywhere?

2 answers

1 accepted

0 votes
Answer accepted
Stefan Salzl
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 17, 2023

Hi @Chris F 

Could you please describe your whole use case in more details? What is your entry point/when should this be done and what is the expected result? This would also make a difference on how and where to do the calculation.

Furthermore: Are the fields across different projects or should the result be processed in a different project? Why are you considering your rule to be a global rule?

Something I you could try quickly is:

- create a variable (eg. varAddition) that does the 1st calculation (the addition of field1 + field2)
- create action "log action" that returns your variable (varAddition) for testing purpose.
- create another variable (eg. varMultiplication) that takes in the value of varAddition.asNumber (you have to convert to number with .asNumber as variables are stored as string) and the does the multiplication with the value of field2
- create action "log action" that returns your 2nd variable (varMultiplication) for testing purpose.

Hope that was helpful.

Best
Stefan

Chris F April 19, 2023

Brilliant, variables worked. Thanks @Stefan Salzl !

Like Stefan Salzl likes this
0 votes
Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 17, 2023

Hi Chris,

can you try using a variable?

set the variable to the field1 x field2

record the variable value using log action so we can assess

finally add the variable to the final field

Chris F April 19, 2023

Thanks @Jack Brickey , variables were the answer.

Suggest an answer

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

Atlassian Community Events