Project and Portfolio Management Practitioners Forum
cancel

Help On Portlets

Highlighted
Lizabeth
Super Contributor.

Help On Portlets

Hello,

We need to write a portlet, where the rows become the columns, and the count is diplayed per column.

So If 'select in query' returns -

A
B
A
C

We need it to be written as

A B C
2 1 1

where AB,C are values in a Drop Down List.

One way is to Hardcode the values and then calculate counts by writing functions for each, however this makes the portlet heavy and would have to be re-written/modified if any value is added and has to be diaplayed. And moreover we have 10 columns.

I was hoping if someone has a dynamic way of doing this.

Thanks for your help.
2 REPLIES
Erik Cole
Acclaimed Contributor.

Re: Help On Portlets

Hi Lizabeth,

You could write some dynamic SQL to calculate the correct columns based on the data and build your query formatted that way (as in if you added a 'D' row in the data then add a 'D' column to the query), but since you have to reconfigure the portlet's data source & definition for each new column you wish to add anyway, I don't think that is viable on the PPM side.
Lizabeth
Super Contributor.

Re: Help On Portlets

Thanks Eric,

I found a way out, I used the concept of 'Pivot table' to write the Query, I do not have to write functions for each column( the way I thought earlier).

Thanks for your help.