Forums

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

Is This Right?

Laurence Reynolds
Contributor
February 14, 2022

Hi,

I am looking at these two support documents ( https://confluence.atlassian.com/jirakb/importing-insight-object-type-with-attributes-referencing-existing-objects-1095240988.html ) and ( https://support.atlassian.com/jira-service-management-cloud/docs/create-attributes-and-references-from-your-data/ ) as I want to import data in to Insight and create objects (or should I say object types?) with multiple references.  The text says I should use the IQL statement "LABEL IN (${Locator${0}})" and replace "Locators" with the names of the Locators (Attributes?) that I want to use as references.  But I see a problem with this - there is no "Locators" in the statement, but there is "Locator$".  Can anybody provide me with the correct syntax for this IQL statement. 

Also does the number in brackets [i.e. "(0)"] represent the importance sequence of the references [e.g. (1) for the first reference, (2) for the second reference, Etc.).  Please advise.

Thanks in advance.

Larry. 

1 answer

1 accepted

0 votes
Answer accepted
Andrea
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 23, 2022

Hey @Laurence Reynolds

I think I understand what you're asking and I'll do my best to answer your question (but please clarify if I miss the mark).

But I see a problem with this - there is no "Locators" in the statement, but there is "Locator$".  Can anybody provide me with the correct syntax for this IQL statement. 

You're right, there's a typo in the docs there (and I've reported it). It should say:

If you are mapping multiple references from the data, enter Label IN (${Locator${0}}) where Locator is replaced by the name of the Locator.

Here, the locator refers to the reference to this data within your import source. What type of import are you doing? (e.g. CSV, JSON, Discovery?).

In the case of CSV, the Locator is the name of the column header. This is the value you should see in the "Data Locator" column in the UI as well. So if you have a column header called "Location" in your file, your Data Locator would be "Location" and your reference IQL would be "Label IN ($Location${0}})".

 

Also does the number in brackets [i.e. "(0)"] represent the importance sequence of the references [e.g. (1) for the first reference, (2) for the second reference, Etc.).  Please advise.

To be honest, I don't know this one. I tried swapping out 0 for 1 or 2 in a simple example I had and it didn't import any object references unless the value was 0. I'll try to follow up and understand that bit and get back to you. But hopefully these initial answers help!

Andrea

Laurence Reynolds
Contributor
February 24, 2022

Hi Andrea,

Many thanks for the above.  Much appreciated.  I hope you can get an answer to the second part.  Is there an IQL reference guide anywhere?

Regards.

Larry.

Andrea
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 24, 2022

Hey Larry, good news! I dug up some docs:

Overall IQL: https://support.atlassian.com/jira-service-management-cloud/docs/use-insight-query-language-iql/

Specifically on the placeholders: https://support.atlassian.com/jira-service-management-cloud/docs/use-placeholders-to-replace-information-depending-on-context/

Using Label IN (${Locator${1}}) will select the first value if you have multiple values in a single "cell" of the CSV. These values are detected using a regular expression (which defaults to splitting the cell values on `||`).

Unfortunately while checking this I found a bug with using (${Locator${1}}) when you have a mix of single and multiple values for a Locator. https://jira.atlassian.com/browse/JSDCLOUD-10987

Laurence Reynolds
Contributor
February 24, 2022

Many thanks once again Andrea

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events