OQL: Limit for a subquery and adding page parameters

Hi all, I've tried to read up in the documents regarding OQL but I can't seem to make sense of it I have a situation where I need to write an OQL query (using a data set) to display in a report grid to (hopefully) make the query faster. The page has a holder entity as a page parameter. This holder entity can have a LOT of entities (let's call it entity A) associated with it. Entity A also has associations with other entities. The report grid needs to display a single attribute of the other associated entities of entity A. My current query looks something like this: select a.Attr1 as aAttr1, b.Attr1 as bAttr1, c.Attr1 as cAttr1 from Module.HolderEntity as hld join hld/Module.HolderEntity_A/Module.A as a join a/Module.A_B/Module.B as b join a/Module.A_C/MetaData.C as c limit 100   So my question two-fold: 1) How do I add an page parameter to an OQL data set     - I tried to define it in the parameter section of the data set, but I can't seem to access it using the '$'-convention 2) How can I limit the amount of the join in "join hld/Module.HolderEntity_A/Module.A as a"?     - I tried "join (select * from hld/Module.HolderEntity_A/Module.A limit 100) as a", but then I get a "does not resolve to an entity" for all the following joins Thanks in advance!
3 answers

You only need to parameters in the where clause

So in the FROM change that to Module.Holder

then in WHERE you would have something like hld/id = $Holder   

  1. There should be a prams section under where you put the query and then  you should be able to use $ as you tried 
  2. Try adding the columns you need in you subquery instead of “select *” try “select col AS subCol”  and  the refer to “alias/subCol”

Hi Stephen,

Thank you for your response. Unfortunately, adding the parameter in the section you indicated does not work (hence the question). Kindly refer to the screenshots below.