Project and Portfolio Management Practitioners Forum
cancel

Portlet filter with batch number 2 from request form

SOLVED
Go to solution
Highlighted
Jajcen Harris
Valued Contributor.

Portlet filter with batch number 2 from request form

Hello All,

I am trying to get my filter in my portlet to work. It is bringing back no results. Here is my query:


AND INSTR('[P.PICK_WEB_CATEGORY]',substr((select det.parameter1 from kcrt_request_details det where det.request_id =req.request_id and det.batch_number = 2), 1, 29)) > 0

has anyone had experience with batch 2 queries?

Thanks!
2 REPLIES
Erik Cole_1
Outstanding Contributor.
Solution

Re: Portlet filter with batch number 2 from request form

Is your batch2.parameter1 field multi-select? The way this is written, you will only get a result if batch2.parameter1 = [P.PICK_WEB_CATEGORY] exactly, but not if [P.PICK_WEB_CATEGORY] IN batch2.parameter1. You would need to flip the parameters to the INSTR function for that.

Also, you could just use a join to kcrt_request_details in your query...

select a.field1,a.field2
from kcrt_request_details a,
kcrt_request_details b
where a.batch_number = 1
and b.request_id = a.request_id
and b.batch_number = 2
and b.parameter1 = '[P.PICK_WEB_CATEGORY]'
etc...
Jajcen Harris
Valued Contributor.

Re: Portlet filter with batch number 2 from request form

Thanks!! That helped out alot!