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

Sql query in descriptor

Mounika
MEGA Partner
MEGA Partner
Hello.
I am trying to develop a rtf descriptor.
I am using customised queires to filter the data in groups.
Query:
Select [folder of organisational process] into @sub where [parent folder] &"name" keep @sub
This query outcome is giving me collection of folders.
Now i want to use output of this collection as input to another group.
I have written query as below.
Select [organisational process ] where [parent folder] in @sub.
Now, i am stuck over here.
Because the first query output has 2 folders, so now i want the loop to run and give me the list of process to linked to each folder.
But the second query is giving me the collection of process there in 2 folders at a time.
Can some one please help me out
1 Reply

lionel
MEGA
MEGA

Hi there,

if your want quick help, try to be more precise in your demand, and why not give example of what you're talking about (screenshots or other...).

If I understood well :

You have an RTF descriptor which entry point is the metaclass "folder of organisational process".

You have a first sub group created with the following query :

Select [folder of organisational process] into @sub where [parent folder] &"name" keep @sub

And you want a sub sub group that would list organisational processes for each folders from @sub.

My question is, why do you want to use queries since your not filtering anything but just using standard metaAssociation ?

Your first sub group should be created based on the "Sub folder" metaAssociationEnd, and your sub sub group should be based on the "Referenced organisational process" metaAssociationEnd.

If one day you really need filters (and if I understood correctly your needs), here is what you should do.

First of all, the @sub is not necessary. Your query for your first group should be :

Select [folder of organisational process] where <condition for filtering> and [parent folder] &"name" 

Then, the query to create your sub sub group should be :

Select [folder of organisational process] where name &Root
Select [organisational process] where <condition for filtering> and [parent folder] &name

Since your entry point and your first group are based on the same metaclass (folder of organisational process), if you have only one variable in your query for your sub sub group, it will concern the root of the descriptor, and not your parent group. That's why you need the first line to "eliminate" the root 😉

 

Hope that helps, even if I'm not sure that it was exactly your problem 😉

 

Regards,

 

Lionel