My question is regarding Multi-select filter fields. I am having a problem getting them to compeltely work and I am unsure as to why.
Basically I have created a list portlet that shows all the enabled users for the company. One column on this list is represented with RESOURCE_CATEGORY_CODE which can have one of the 5 values; FULL_TIME, PART_TIME, CONTRACTOR A, CONTRACTOR B and SUPPLIER. I have been asked to provide a multi-select filter on this so the user can select 2 of the 5 values and it will just return the rows that have those values in.
The SQL data source I have created is very simple and only pull data from one table. See below.
SELECT USERNAME USER_NAME, FIRST_NAME FIRST_NAME, LAST_NAME LAST_NAME, START_DATE START_DATE, END_DATE END_DATE, RESOURCE_CATEGORY_CODE CATEGORY, USER_ID USER_ID FROM KNTA_USERS WHERE (END_DATE >= sysdate OR END_DATE is NULL) AND RESOURCE_CATEGORY_CODE =[P.RESOURCE_CATEGORY_CODE.TO_STRING]
I have tried variations of the filter field i.e. AND RESOURCE_CATEGORY_CODE IN([P.RESOURCE_CATEGORY_CODE]) etc but I am having no luck. There is no SQL error however it when ever I choose more than two values no results are returned. I have attached screenshot of datasource and
I have tried the .TO_STRING method, but sadly that does not work either. I have mad ea typo in the query and attached it to this thread (SQL Error1). I have also attached two other SQL Errors from other things I have tried. Each error seesm to show a '?' in the Error.
The validation I used was from one that was previously there. I just copied it and have been using that version to avoid damaging anything. The filter field is newly created as is the portlet datasource.
If you require any other information please let me know