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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Insight IQL using current objects attribute to filter available referenced objects

I have two types of objects. Elements and Options 

Options have an outboundReference can be chosen by to various different Elements

Now I would like to be able to select an Option in my Element's Attribute called "Chosen Option". The options given should be narrowed down to the Options that have an outboundReference to the current object.

Is there any way to achieve this?

I had a few IQL's that ended up in errors while searching for an answer and looked through the documentation without success.

image.png

2 answers

1 accepted

2 votes
Answer accepted

Hi Andrej,

today I faced a very similar challenge compared to your request. Just to explain in short: we have an Object Type OSPlatform. The OSPlatform is referenced from two other ObjectTypes: Configuration and Computer. Configuration and Computer are referenced by a fourth ObjectType called ServerControl.

The idea was to limit the Configurations attachable to ServerControl according to the OSPlatform defined at the Computer object.

I used the following filter for the attribute Configurations at ServerControl:

object HAVING outboundReferences(objectType = "OSPlatform" AND object HAVING inboundReferences(objectType = "Computer" AND Name = ${Device}))

 

Ok, what does that mean? I try to express it clearly. Select all Configurations having outbound references to an ObjectType OSPlatform. But not every OSPlatform is valid. So we have to be more specific and just select OSPlatforms with inbound references from Object Type Computer. But not every Computer is valid. It has to be a Computer with the same Name as the Device referenced to the actual object, which is ServerControl. So in this case we need the Placeholder ${Device}.

 

Not sure if I explained that in a Crystal clear way. Hope it helps. If you have any further questions do not hesitate to contact me.

Regards,

Tobias

Good explanation. Thanks. 

Hi Andrej,

This should be possible, but remember that it will only work when editing object, not when creating new ones.

You would need a combination of IQL and placeholders which you can read about att

I think that adding IQL to the attribute Chosen Option under it's configuration and setting it to something like this should have the effect you want:

object HAVING inboundReferences(Key = ${can be chosen by${0}})

Is can be chosen by the reference type or the attribute name?  What should be used in the above example is the attribute name.

There is also a video demonstrating how to set the IQL up using placeholders at https://www.youtube.com/watch?time_continue=2&v=u_SfRBKJOJY Perhaps that can be of help :)

Best Regards
Alexander

Hey Alexander,

this looks like a splendid solution. However as I tried to implement it, there were always zero results. I think this is getting close to what we are searching for.

I was able to narrow it down as follows

Element Attributes:

Bildschirmfoto 2018-02-16 um 10.26.02.png

 

Option Attributes:

Bildschirmfoto 2018-02-16 um 10.26.18.png

 

Now when I try to have all Options for the Servicelement ASE, it works if i have a quite simple IQL Filter for attribute Serviceoptionen like this one

Servicelement = "ASE"

If i change it to a placeholder it does not work anymore

Servicelement = ${Name}

It seems to me like I am make some sort of fundamental mistake here but as far as I understood this should work just fine.

 

Thanks in advance

Andrej

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Apps & Integrations

🍻🍂Apptoberfest Update: Upcoming Virtual Events 🎉

Hello Community! I hope you've been enjoying the 🍂Apptoberfestivities🍂 (I know I have!) The event is heating up next week with a series of virtual events that we're calling the 🍻🍂Partner App ...

471 views 5 18
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you