Forums

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

Create Lookup table with field specific keys?

Jeremy Wood
Contributor
March 6, 2026

Hello Atlassian Community. 

What i am looking to do is to calculate a risk score based on the values of several fields that a customer would answer when creating a ticket. I was looking up ways to do this and found some documentation on using a  lookup table for this, but the issue i ran into is that several of my questions have the same answer (yes/no) but should have different values towards the total score. 

I think i could create a lookup table for each custom field but i was wondering if instead i could somehow specify the custom field in the key. So basically i get something like the below. 

KeyValue
 CustomField_1 = Yes10 
 CustomField_1 = No
 CustomField_2 = Yes20 
 CustomField_2 = No10

 

1 answer

1 vote
Trudy Claspill
Community Champion
March 6, 2026

Hello @Jeremy Wood 

Yes, you can make the keys like that.

You would then have to build up a string that gets the field "name" and the field value and concatenates them together to give you a single value you could use as the key during your get() operation on that table.

{{tableName.get(yourConcatenatedString)}}

Jeremy Wood
Contributor
March 6, 2026

That's great to hear i can do this. But I'm not sure i follow your explanation. Would you maybe be able to show me how i would set this up with some screenshots? 

Trudy Claspill
Community Champion
March 6, 2026

So let's say one custom field has the name "My Field", and you set it to Yes.

And you want the Score for that to be 100, while the score for the value being No will be 10.

You create a lookup table with the name "My Table" and you say you want something like this:

 key value 
My Field = Yes  100 
My Field = No  10

To get the value 100 from that lookup table you need to use the get() operation for the table and provide it with input that matches the key. The format of the command is:

{{tableName.get(key)}}

i.e. 

{{My Table.get("My Field = Yes")}}

...will return the value of "100".

To get the value "100" you will need to construct a string that matches what you specified as the key for that value.

To get the actual value in "My Field" in your issue you would use the smart value:

{{issue.My Field}}

That gives you "Yes". That doesn't match your keys.

You need the name of the field also. You can get that from the smart value:

{{issue.My Field.name}}

ref: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-issues/#--issue.

You can use the concat() function to stick two strings together; i.e.

{{issue.My Field.name.concat(issue.My Field)}}

... will glue the field name and the field value together yielding

"My FieldYes"

That still doesn't match your keys.

....

Given all this work to construct values to match your keys to do you lookup, the simpler path is to create separate tables for each field.

Jeremy Wood
Contributor
March 6, 2026

Thank you for the details answer!

I agree its not simpler, but now im curious about the concat function. Can you do multiple concat(String str) in a single value?
For example:

{issue.My Field.name.concat(" = ").concat(issue.My Field)}}

Trudy Claspill
Community Champion
March 6, 2026

You should give that a try and see what you get. ;-)

Like John Funk likes this

Suggest an answer

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

Atlassian Community Events