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

Query to show two Classes in Results

dandylyons
Contributor

Is it possible to write an ERQL query to show two related metaclasses in the results window.

For example If I have a [Capability] and a [Business Capability Component], how do you show both ends of the association in the results window?

3 Replies

Hi,

 

Another variant of the example above is if the classes are aub-classes of another abstract metaclass. E.g. Business and Organizational Process are sub-classes of the BPMN Activity, so using Select [BPMN Activity] would give you all processes and other meta-classes that are of the kind BPMN Activity. 

sambak
Retired

Hey,

 

Yes You can get two types of objects by a single query code, here below an example :

Select [Application] Into @App Where [Application Code] Like "#11#"
Select [Portfolio] Into @Port Where [Name] Like "#po#" 
Select ~p20000000E30[~p20000000E30[Generic Object] From @App Or @Port

 

this query return two types of objects: Application and Portfolio:

 

sambak_0-1608803967458.png

 

 

(It's just an example, you can use what you want with the desired conditions, and at the end, use the generic Object metaClass to get results).

 

 

SAM,

DMiddleton
Retired

By their nature Queries only return a single MetaClass.

To do what you want you can write a Report Dataset to show multiple MetaClasses