Let's say I have these object types connected like this:
Region - Country - City
When a user creates a work item and in here selects a Region, I want to use Automation for searching Assets and find all countries and cities connected to this region and add the result in a comment.
I know how I can find first level results (countries).
But next level, cities, I'm struggling to get right. And if I had Attractions for each City as well, how would I find and list those?
Hi @Thomas Pedersen Ljungstrom ,
Like @Marc -Devoteam- it does help a lot to post more data.
Having said that, I can make an assumption that you have referenced the objecttypes like:
Region <- Country <- City <- Attractions
Meaning the attribute of an attraction is City, the attribute of a city is country, etc.
Suppose you have set an Asset custom field called Region, then you can use this lookup AQL to get your data for attractions:
objecttype = Attractions and objects having outR(objecttype = City and objects having outR(objecttype = Country and objects having outR(objecttype = Region and Name = "{{issue.Region.label}}")))
For Cities, you peel off the outer layer:
objecttype = City and objects having outR(objecttype = Country and objects having outR(objecttype = Region and Name = "{{issue.Region.label}}"))
Same for Countries:
objecttype = Country and objects having outR(objecttype = Region and Name = "{{issue.Region.label}}")
This was exactly the answer I was looking and hoping for. It works perfectly for me and makes me able to continue what I'm doing :)
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Thomas Pedersen Ljungstrom
Whenever you ask for help with an Automation Rule it will help us to help you if you provide:
1. what type of project is this (e.g., company-managed, team-managed, etc.),
2. images that show your complete rule.
3. images showing the details of any relevant actions/conditions/branches.
4. images showing the Audit Log details for the rule execution.
5. Explain where the issue is.
These questions are not for not willing to help, but to have community members understand on how automation works.
Also share details of your structure in aseets
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Understood. I'm working with company data, so I need to manipulate it before posting my question, which is why I was hoping my example with Region/Country/City would work instead.
But I get what you're asking for and appreciate you're pointing it out to me. I will keep this in mind, should I need to post another question.
I see @Rudy Holtkamp actually gave me the answer I needed, so I'll close this one :)
Thanks for the help and input!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Thomas Pedersen Ljungstrom
Would be great if you cols place the result of your automation here as a comment.
This to help other get insight and a probable solution.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.