Project and Portfolio Management Practitioners Forum
cancel

How to define IF-THEN or WHERE case statements in PPM

Highlighted
swaroop.nani
Respected Contributor.

How to define IF-THEN or WHERE case statements in PPM

Hi,

can any one tell me how to define IF-THEN or WHERE case statements in PPM?

I would like to display only requests with field A = X (any priority) AND field A = A/B/C but priority "ON HOLD"
6 REPLIES
Mahen M
Acclaimed Contributor.

Re: How to define IF-THEN or WHERE case statements in PPM

Hum,
I hope the request fields is in 2 tables
KCRT_REQUEST_DETAILS
KCRT_REQ_HEADER_DETAILS

You can get priority from KCRT_REQUESTS table.

I am not sure whether your problem is in writing queries or something else.

Regards,
Mahendran M
Sascha Mohr
Acclaimed Contributor.

Re: How to define IF-THEN or WHERE case statements in PPM

Hi.
you can have that in the request search and in in the request list portlet. There is a section called additional filters. If it is not there, a server.conf parameter needs to be changed.
swaroop.nani
Respected Contributor.

Re: How to define IF-THEN or WHERE case statements in PPM

Hi Mahendran,

My problem is in writing query only, I am able to retrive the data propely, but I am unable to order the data as per the requirement.

Can we some how order the requests in the following way?

ORDER BY Field A, Field C but if the value of field B = Z, then ORDER BY should be A,B,C
Daniel Galvez
Super Contributor.

Re: How to define IF-THEN or WHERE case statements in PPM

Hi swaroop.nani

Try to create a new data source, there you can define the query as you wants, then create a new porlet and use the data source that you created. I think that it helps you...

Kind regards,
Daniel
Mahen M
Acclaimed Contributor.

Re: How to define IF-THEN or WHERE case statements in PPM

There will be some rows which has b != z

In that case what you want to do? filter those rows?

So there are atleast 2 colums in your output.

Column 1 with (a,b,c) as values and column 2 with value z

You can create an additional column for rows against 'a' enter '4'

rows against 'c' enter '3'

Rows against 'b' when b=z as '2'

and Rows against 'b' when b!=z as '1'

Order by 'New column', column 1

Regards,
Mahendran M
Sascha Mohr
Acclaimed Contributor.

Re: How to define IF-THEN or WHERE case statements in PPM

If it is just the ordering, make sure b always contains something sortable in the sense you need it. If there is no other way, put a number at the first position for that column.
Didn't know though you need a custom portlet, from your initial request a simple search would have done (s. attachment)