Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

retrieve multiple assets in lookup

steven_allcock October 24, 2023

I have a form and when i run an automation to pull back the values of some assets it works perfectly well with single values. If i have 2 or more selected i get a null return - whats wrong with the query i have here?

If the below has one group its fine, but 2 or more and i get nothing back 

objectType = "EIS Group" AND KEY in {{issue.EIS Group}}

{{issue.EIS Group}} is a custom field looking at the values in the asset object EIS Groups

1 answer

0 votes
Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 24, 2023

You want to check what the value is for {{issue.EIS Group}} when it has multiple values, I suspect that it is not in a format that AQL understands and that is why it if not returning anything. AQL is expecting it to look something like this:

KEY in ("key-1", "key-2")

steven_allcock October 24, 2023

Ah so what i have done is made the scope of this field to single values i think by using the = thinking it would pickup everything in that field. Below is the form and the AQL scope. 

What do you suggest doing with the scope as these can all have multiple values and i guess i need something not so rigid.

The scope is for the authority level below which is blank because the group field contains 2 values

img1.pngimg2.png

Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 25, 2023

This is what I would do, I would add a log action that has the value of {{issue.EIS Group}} so you can see what the format looks like. You can then from there use smart values to remove/replace characters so that if fit with what AQL is expecting. I have an automation that gets approvers based on department that is multi-select and I have a smart value that remove [] and commas like this:

{{approvers.replace(", ",",").replace("[","").replace("]","")}}

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