cancel
Showing results for 
Search instead for 
Did you mean: 

Query objects that dont have owning library set to a particular library

Contributor

Query objects that dont have owning library set to a particular library

Hi,

 

A recent change that we need to do requires that we exclude objects belonging to a particular library from generation.

In order to achieve this, for example on data objects, we are trying to do it with the following query that doesnt compile.

 

Select [Library] Into @retiredLibs Where [Owning Library] = &name

Select [Data Object] where [Owning Library] not in @retiredLibs

 

This does not compile and we are unable to figure out why

Please help

4 REPLIES
Contributor

Re: Query objects that dont have owning library set to a particular library

Try:

Select [Data Object] Where [Owning Library] Not = &name

Contributor

Re: Query objects that dont have owning library set to a particular library

Hello Imran, 

 

The problem is that the library that needs to be excluded has sub libraries as well, which is why we were trying to query with the deeply clause

MEGA

Re: Query objects that dont have owning library set to a particular library

Hello

 

For complex requirements, you can use a VB script macro to implement a query (instead of ERQL code)

 

A function GetSelectionCollection should be implemented
Function GetSelectionCollection (mgobjMegaObject as MegaObject,SelectorID as Variant) as MegaCollection where:
mgobjMegaObject is the object returned by the query parameter
SelectorID is the calling query
This functions should return a MegaCollection

 

Example of standard query installed in the systemdb 
~KL)noxCPEHiO[Organizational Processes of a Business Process (through Sub-Business Processes and Sub-Organizational Processes)]

Jerome
Highlighted
Regular Contributor

Re: Query objects that dont have owning library set to a particular library

the wrong metaAssociationEnd is used

 

Select [Data Object] where [Owning Library] not in @retiredLibs

 

should be

 

Select [Data Object] where [Owner Library] not in @retiredLibs

 

I believe