Clarity

  • 1.  Multi Table portlet

    Posted Nov 18, 2013 09:44 AM

    Helllo All,

    What is the best option to create a Portlet(has to be a portlet) which displays all values from Project,Task and Heirarchy tables?

    Should I go with a query, if so can I do a  * statement in NSQL or is there a way I can combine these objects and create one?

    Apperciate all your help.

    Thanks,

    MN

     



  • 2.  RE: Multi Table portlet
    Best Answer

    Posted Nov 18, 2013 09:53 AM

    If the data is coming from more than one object you cannot crate a System data provider based portlet and a query based portlet is the your only option.

     

    I have a faint recollection about using select * in NSQL queries = you can't as you have to define the dim and props, but if you use a wrapper to put your main query inside it you can.

    That need to be verfied, but you really do not want that unless you want to kill your performance. Select * will bring all the fields even if you display just a couple. Enven more problems if you do that for multible tables.

     

    Martti K.



  • 3.  RE: Multi Table portlet

    Posted Nov 18, 2013 10:01 AM

    You cannot do a select * in an NSQL for portlet. Make sure you limit the data or your portlet will hog the system down.



  • 4.  RE: Multi Table portlet

    Posted Nov 18, 2013 10:59 AM

    Makes sense. 

    Thank you Martti and Michael.

     



  • 5.  RE: Multi Table portlet

    Posted Nov 18, 2013 12:29 PM

    To illustrate my point

    SELECT   @SELECT:DIM:USER_DEF:IMPLIED:Z:Z.id:zid@,
             @SELECT:DIM_PROP:USER_DEF:IMPLIED:Z:Z.name:zname@,
             @SELECT:DIM_PROP:USER_DEF:IMPLIED:Z:Z.code:zcode@
    FROM     
    (select *

    from odf_CA_zObject) z
    WHERE    @FILTER@

     

    works fine and gives

    That is a small object with minum number of attributes and only one instance.

     

    Don't ever use a query like that in a production system for an object with more than one instance and never when querying more than one table.

     

    Martti K.

     



  • 6.  RE: Multi Table portlet

    Posted Nov 19, 2013 03:56 PM

    Got it .Thanks again.