Portlet Multiselect Filter Works Only When More Than One Value Is Selected
search cancel

Portlet Multiselect Filter Works Only When More Than One Value Is Selected

book

Article ID: 277244

calendar_today

Updated On:

Products

Clarity PPM On Premise Clarity PPM SaaS

Issue/Introduction

The filter only works when selecting 2 or more values, however fails when only one value is selected.
The NSQL uses INLINE, which is equivalent of IN in example query: select columns from table where column1 IN ('x','y') 

STEPS TO REPRODUCE:

1. Create an NSQL query:

SELECT DISTINCT 
  @SELECT:DIM:USER_DEF:IMPLIED:PROJECT:inv.id:KEY_ID@, 
  @SELECT:DIM_PROP:USER_DEF:IMPLIED:PROJECT:inv.name:PROJECT_NAME@ 
FROM 
  inv_investments inv 
WHERE 

     EXISTS (SELECT 1
             FROM PRJ_OBS_UNITS_FLAT OBSF
             INNER JOIN PRJ_OBS_ASSOCIATIONS OBSA ON OBSF.UNIT_ID = OBSA.UNIT_ID
             WHERE OBSA.TABLE_NAME = 'SRM_PROJECTS' 
             AND @WHERE:PARAM:USER_DEF:INTEGER_INLINE_LIST:OBSF.BRANCH_UNIT_ID:OBS_ID@
             AND OBSA.RECORD_ID = inv.ID)
AND @FILTER@

Click the Attributes tab and click on the: param_obs_id 

 

Set extended Data Type = Lookup - Numberic

Set Lookup = OBS Filter Browse (OBS_BROWSE_FLT_ALL)


2. Create a grid portlet

 

3. Configure the List  Filter > Layout  section inlcude : param_obs_id




Save and Return.
 

4. Configure the portlet to display and test the filtering.

5. Select only one value from the OBS Filter Browse
 

Expected: Result should display

 

Actual: Error appears

Error 500 - Internal Server Error. The server could not retrieve the document due to server-configuration or other technical problems. Contact your site administrator.


APP error appears:
ERROR 2023-12-14 20:34:09,513 [http-nio-5432-exec-4] dal.NSQLClient (clarity:user:session:npt.gridFilter) Unable to retrieve NSQL cube.  Exception was thrown.
java.lang.ClassCastException: class java.lang.Long cannot be cast to class java.lang.String (java.lang.Long and java.lang.String are in module java.base of loader 'bootstrap')

Environment

16.2.0 and below

Resolution

This is reported as DE78899 and is resolved in release 16.2.1