Clarity: Creating a power filter for an NSQL portlet generates the generic Error 500.

Document ID : KB000051541
Last Modified Date : 14/02/2018
Show Technical Document Details

Description:

The NSQL construction SUM(DECODE(R.ID,4,0,NVL(R.ID,0)/ .. causes Error 500 on a portlet when used as a power filter.

Steps to Reproduce:

  1. Create a Clarity Query
    SELECT @SELECT:DIM:USER_DEF:IMPLIED:RESOURCE:R.FULL_NAME:RSRC@, 
             @SELECT:DIM_PROP:USER_DEF:IMPLIED:RESOURCE:MR.FULL_NAME:MANAGER@, 
    @SELECT:METRIC:USER_DEF:IMPLIED:SUM(DECODE(R.ID,4,0,NVL(R.ID,0)/(CASE WHEN 
    R.ID <> 0 THEN 1 ELSE 3600 END))):AGG@ 
    FROM INV_INVESTMENTS I, 
             SRM_RESOURCES R, 
             SRM_RESOURCES MR, 
             CMN_SEC_USERS U 
    WHERE I.CREATED_BY = U.ID 
    AND U.ID = R.USER_ID 
    AND R.MANAGER_ID = MR.USER_ID 
    AND @FILTER@ 
    GROUP BY R.FULL_NAME, 
             MR.FULL_NAME 
    HAVING @HAVING_FILTER@
  2. Create a Clarity portlet where the AGG attribute is in the filter section

  3. Use the portlet

Expected: The user should be able to filter according to AGG attribute.
Actual: Error 500 - Internal Server Error.

Error from app-niku.log file:

Caused by: java.sql.SQLException: [CA Clarity][Oracle JDBC Driver][Oracle]ORA-00934: group function is not allowed here

Solution:

This issue has been documented as CLRT-43004 and is assigned to development for review.

Keywords: CLARITYKB, error, power, filter, NSQL, clarity8open, clarity12open.