cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Responsible Org-Unit query

ToddDavey
Super Contributor

Hi all,

 

I am using HOPEX V4 CP2.

 

I have been using the Responsible Org-Unit MetaAssociation for a while now and have just been asked to extend it to include a few more "responsibilities" and produce a few reports.

ToddDavey_0-1665636230773.png

Adding in the new "responsibilities" is easy enough.

ToddDavey_1-1665636289791.png

And setting up the MetaPropertyPage and so on was not a concern.

 

My problem comes when I try to query the data.

I would like to extract Org-Units for an Application where the specified "responsibility" = "Y"

 

Select [Org-Unit] Inherited Where [Assigned Application]=&"object" And [Assigned Application].["responsibility"] = "Y".  for example:

ToddDavey_2-1665636510905.png

 

The result includes all Org Units that have an association to the Application and have an association to the "responsibility", but not a combined Application / "responsibility" association. 

 

For example:

App1 has  Org Unit 1 with Process Manager responsibility

App 1 has Org Unit 2 with IT Manager responsibility

App 2 has Org 1 with IT Manager responsibility

 

if I run query - Select [Org-Unit] Inherited Where [Assigned Application]="App1" And [Assigned Application].[IT Manager] = "Y" - I would get Org Unit 1 and Org Unit 2 returned, even though Org-Unit 1 does not have a IT Manager relationship with App 1.

 

My first thought was maybe I added the MetaAttributes to the MetaAssociation incorrectly, so I tried the query on standard Out of the Box config and got the same result. 

 

I have gone through the query documentation and tried to find a similar query but have failed to find an answer. 

 

Can anyone please help with this.??

 

Many thanks,

Todd 

 

2 Replies

Thank you so much,

I have been 3 days trying various sqls to try and get this.  I didn't know you could use brackets like that.

Problem solved.

OLeGuellec
MEGA
MEGA

Hi,

 

you need to use brackets after the dot to express the two conditions should be met by a single instance when browsing the link

 

something like

 

Select [Org-Unit] Where [Assigned Application].(name like &name And ["responsibility"] = "Y")