Lookup tables to store values
Asked by Lana Kelly:

I am trying to assign values to different dropdowns, and then multiply the value of two different dropdowns together. I have created lookup tables for them both,  
![Screenshot 2023-08-31 at 10.33.46.png](https://community.atlassian.com/t5/image/serverpage/image-id/278156i0F2279D9D986E823/image-size/large?v=v2&px=999 "Screenshot 2023-08-31 at 10.33.46.png")![Screenshot 2023-08-31 at 10.34.22.png](https://community.atlassian.com/t5/image/serverpage/image-id/278157iFCD3689ECA2FE68C/image-size/large?v=v2&px=999 "Screenshot 2023-08-31 at 10.34.22.png")

I want then to multiply the value from each table to give me a quantified risk score. Do I need to create a variable for each thing, or can I just lookup from these tables? At the moment, my next step is:  
![Screenshot 2023-08-31 at 10.36.20.png](https://community.atlassian.com/t5/image/serverpage/image-id/278158i437AE762810E53AA/image-size/large?v=v2&px=999 "Screenshot 2023-08-31 at 10.36.20.png")

Sorry for all these questions. I'm quite new to automation still.


Answers:
author: Matthias Gaiser _K15t_
body: Hey [@Lana Kelly](/t5/user/viewprofilepage/user-id/5181341)

no need to be sorry. Your questions are totally fine - and I think you're close to the solution yourself. It's a good idea to use lookup tables for defining the numerical value for both of the fields.

In the **Edit Issue** step, you only need to modify your smart value, so that it takes the value from the fields and looks it up in the tables. I think, this one should work:

```
{{#=}}{{SeverityTable.get(issue.Severity)}} * {{LikelihoodTable.get(issue.Likelihood)}}{{/}} 
```

All the best with your automation,

Matthias.

comments: author: Lana Kelly
body: I just tried it and it works! Thank you so much! ?


author: Mat Levell
body: Hi [@Matthias Gaiser _K15t_](/t5/user/viewprofilepage/user-id/853318) im trying to a very similar thing but Im getting stuck. I have a multi select list of questions that I would like to apply a weighted score based on how the user answers. Im struggling to get the Priority Score field to populate at all let alone sum the values the user selects. Any help would be amazing!!  
![Screenshot 2024-08-14 at 12.53.46?PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/341850i857636E7988798E5/image-size/large?v=v2&px=999 "Screenshot 2024-08-14 at 12.53.46?PM.png")![Screenshot 2024-08-14 at 12.54.41?PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/341852iAF839B334D868CEE/image-size/large?v=v2&px=999 "Screenshot 2024-08-14 at 12.54.41?PM.png")

comments: author: Mat Levell
body: I also tried it without a lookup but im getting an odd error.  
{{#=}}  
{{#if(issue.customfield_10295.value.contains("Is the issue present on all vehicles?"))}}20{{/}}  
+  
{{#if(issue.customfield_10295.value.contains("Is the issue present on all models?"))}}50{{/}}  
+  
{{#if(issue.customfield_10295.value.contains("Does the issue result in a model being banned?"))}}100{{/}}  
{{/}}  
![Screenshot 2024-08-15 at 2.29.25?PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/342052iC21A3BEF131199C6/image-size/large?v=v2&px=999 "Screenshot 2024-08-15 at 2.29.25?PM.png")


Tags: cloud

jira-software

jira-software-cloud