kdiouf

Hierarchical knowledge store custom portlet

Discussion created by kdiouf on Jun 10, 2014
Latest reply on Jun 11, 2014 by kdiouf

Hi all,

I am facing a issue when building a hierarchical knowledge store custom portlet that allow us to filter on the name of the folder or files that are in folder.

When I filter on folder I got  the folder without their descendants ( see screenshot below)

And when I filter on a file name I got no results.

That the query used to build that portlet.

SELECT @SELECT:DIM:USER_DEF:IMPLIED:OBJ:KStore.ID:ID@,
@SELECT:DIM_PROP:USER_DEF:IMPLIED:OBJ:KStore.NAME:NAME@,
@SELECT:DIM_PROP:USER_DEF:IMPLIED:OBJ:KStore.HG_HAS_CHILDREN:HG_HAS_CHILDREN@
FROM (

SELECT CF.ID ID,
          CF.NAME NAME,
          CASE
            WHEN ( SELECT COUNT(*)
                  FROM CLB_DMS_FOLDERS CF1,
                        CLB_DMS_FILES CFI1
                  WHERE CFI1.PARENT_FOLDER_ID = CF.ID ) = 0 THEN NULL
            ELSE  CF.ID
          END HG_HAS_CHILDREN
FROM CLB_DMS_FOLDERS CF
WHERE  CF.FOLDER_TYPE = 'StandardFolder'
AND CF.PATH_NAME LIKE '/Root/DMS/KS/INFRA'
AND  @where:param:user_def:string:hg_row_id@ is null
UNION ALL
select CFI.ID,
       CFI.NAME,
       NULL HG_HAS_CHILDREN
from CLB_DMS_FILES CFI
WHERE CFI.PARENT_FOLDER_ID= @where:param:user_def:string:hg_row_id@) KStore
where @FILTER@

 

If someone can help to get this working.

 

Regards,

-karim-

 

 

Outcomes