Forums

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

Automation - Extract number from multiple alphanumeric strings

Simon Galiazzo
December 17, 2025

Hi all,

I'm pulling my hair out.

Situation:
I have multiple (6) custom dropdown fields, and the options for each of these fields is slightly different alphanumeric text - but they all start with "3.", "2." or "1."

Goal:
I am trying to create an automation rule, that:

  • Uses multiple variable actions to extract the first characters/digits from each field option
  • Runs another variable action, to add these values together
  • Then an IF/ELSE statement to set another dropdown field (based on the total value)

Problem:
I can't seem to make this automation work. I keep getting this error:

"Unable to render smart values when executing this rule:
Missing parameter(s) for operator +u: + + + + +" 

I've tried various different smart value functions: .split, .char(0) etc. But none has worked correctly. The only time I don't get this error, is when I add a "0" to the total variable action.. But this just lets the automation run successfully, while not totaling the number values correctly.

Please help gurus!

 

3 answers

1 accepted

1 vote
Answer accepted
Simon Galiazzo
December 17, 2025

I ended up being able to solve this, using the below formatting for the first batch of variable actions:

{{#=}}IF({{Issue.customfield.value.startsWith("3")}},3,IF({{Issue.customfield.value.startsWith("2")}},2,IF({{Issue.customfield.value.startsWith("1")}},1,0))){{/}}

And for the total automation:

{{#=}}{{variable1}} + {{variable2}} + {{variable3}} + {{variable4}} + {{variable5}} + {{variable6}} +0 {{/}}

 

2 votes
Rik de Valk _Brainboss_
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.
December 17, 2025

Hi @Simon Galiazzo , 

You should be able to use a combination of smart values to get to where you want. 

The first step is to create a variable for the value of a field. The reason for this is that select list values do not behave as Text values. Therefore you can't directly use 'left' or 'split'. So step one: 

Action "Create variable" and set the variable to

{{issue.Your field name}}

If the number is always the first (single) character, you can use the 'left' smart value to get the first character.

{{yourVariable.left(1)}}

Now you can use it as a number and do math expressions. 

{{#=}}{{yourVariable.left(1)}} * {{yourVariable.left(1)}} {{/}}

Hope that helps. 

Have a nice day! 

Rik  

 

 

 

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 Champions.
December 18, 2025

Hi @Simon Galiazzo 

For a multiple-select option field where the leftmost character of each value is a numeric digit, this would return the total:

{{#=}}{{issue.customfield_12345.value.left(1).join(" + ")}}{{/}}

How that works is:

I recommend considering what you want to do when there are no options selected.

 

Kind regards,
Bill

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events