Forums

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

Link objects directly during CSV import

Ann-Katrin
Contributor
February 23, 2023

I plan to do a bulk import of various assets. I would like to assign the respective user to the assets directly during the import. I added my users via an AD export and CSV import.

Now I start with my assets.

Unfortunately, it is not possible for me to link the user who uses the asset directly to.

I don't want to have to do everything manually with over 4000 assets. I've already searched various sites, but I just can't get along with the AQL commands. I'm also slowly running out of ideas as to what else I could do to map two objects together :(

Everything I've tried doesn't work or the same user is written to every asset over and over again.2023-02-23 07_39_19-Assets-Objektschema - Jira und 7 weitere Seiten - Geschäftlich – Microsoft​ Edge.png2023-02-23 12_40_00-Objektschemakonfiguration - Jira und 14 weitere Seiten - Geschäftlich – Microsof.png2023-02-23 11_58_53-Assets-Objektschema - Jira und 14 weitere Seiten - Geschäftlich – Microsoft​ Edg.png

1 answer

1 accepted

3 votes
Answer accepted
Kris Dewachter
Community Champion
February 23, 2023

Hi @Ann-Katrin ,

If i understand correctly, you are trying to link a user (which is stored in the object 'Mitarbeiter', to an object 'Smartphone'.

Normally, you should be able to link them via the 'UPN' which is defined as the unique key.

Can you also post here how you mapped this in the csv import? 

Best regards,

Kris

Ann-Katrin
Contributor
February 23, 2023

Hi @Kris Dewachter 


In my import file, I also have a column with the UPN attribute in the header.

image.png

Now when I define the mappings I get this notification that a reference AQL is needed. I have absolutely no idea where I can get the AQL reference from.

image.png

Kris Dewachter
Community Champion
February 23, 2023

Hi @Ann-Katrin ,

The AQL is used to lookup the corresponding object in order to make the link.

So in your case, the AOL you will probably have to enter will look like this:

Label=${UPN}

So when running your csv import, the system will create the 'Smartphone' objects.

It will use the UPN number from your csv file to lookup the corresponding user in the 'Mitarbeiter' objects. (This is what the AOL does. It will try to find a 'Mitarbeiter' with a label that matches the UPN number.

 

Hope this works,

Best regards,

Kris

Ann-Katrin
Contributor
February 23, 2023

Hi @Kris Dewachter

i tired this - but what i get is 

"Invalid placeholders in the AQL for the user attribute. Placeholder UPN does not exist as a data locator" 

image.png

But i can't define a Placeholder at my "Mitarbeiter" attribute UPN

Kris Dewachter
Community Champion
February 23, 2023

Hi @Ann-Katrin 

What is the name of the 'UPN' column in your CSV file? Is it "UPN" or "Primary user UPN" ? In your previous screenshot, the column was named "UPN".

If the column in you csv file is "Primary user UPN" then the AOL should also be 

Label=${Primary user UPN}

 

BR, 
Kris

Ann-Katrin
Contributor
February 23, 2023

@Kris Dewachter

It works :D thank you very much for your help :)

I must have had a knot in my brain here :D

Like Dave Mathijs likes this
Kris Dewachter
Community Champion
February 23, 2023

Hi @Ann-Katrin 

Glad I could help. It's nice to hear the issue got resolved.

If my answer was helpful, please don't forget to click the green 'Accept Answer' button. This makes it easier for other people to find a solution for similar issues.

Thank you and best regards,

Kris

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