AnsweredAssumed Answered

OBS Filter Browse - Portlet Won't Select Decendants

Question asked by Shane.Steeves on Sep 4, 2013
Latest reply on Sep 5, 2013 by Shane.Steeves
I realize there are similar posts on here, but none have been able to set me straight yet, so posting here again.

I've created a view, to simply my writing some Portlets. View is called AllData, and contains Time by Resource, Project, Task, Department, etc.

I've created a Query in Clarity, with the following N-SQL, listed below.

I then added a lookup to the Department parameter for "OBS Filter Browse".

Then I created a portlet around this query. It works perfectly, but if I choose an OBS unit, it only returns the values for that specific unit, and not any units under it. It's my understanding I need to modify my Where statement in this N-SQL, but I'm not sure how it needs changed. Any help?

SELECT @SELECT:DIM:USER_DEF:IMPLIED:RESOURCE:ROWNUM:ROWNUMBER@,
@SELECT:METRIC:USER_DEF:IMPLIED:A."User_ID":UserID@,
@SELECT:METRIC:USER_DEF:IMPLIED:A."Full_Name":FullName@,
@SELECT:METRIC:USER_DEF:IMPLIED:A."ResourceIsActive":ResourceIsActive@,
@SELECT:METRIC:USER_DEF:IMPLIED:A."DepartmentID":DepartmentID@,
@SELECT:METRIC:USER_DEF:IMPLIED:A."Department":Department@,
@SELECT:METRIC:USER_DEF:IMPLIED:A."Project":Project@,
@SELECT:METRIC:USER_DEF:IMPLIED:A."ProjectIsActive":ProjectIsActive@,
@SELECT:METRIC:USER_DEF:IMPLIED:A."Task":Task@,
@SELECT:METRIC:USER_DEF:IMPLIED:A."Hours":Hours@,
@SELECT:METRIC:USER_DEF:IMPLIED:A."SliceDate":SliceDate@,
@SELECT:METRIC:USER_DEF:IMPLIED:A."Employee_Type":EmployeeType@,
@SELECT:METRIC:USER_DEF:IMPLIED:A."Time_Sheet_Status":TimeSheetStatus@,
@SELECT:METRIC:USER_DEF:IMPLIED:A."Input_Type":InputType@,
@SELECT:METRIC:USER_DEF:IMPLIED:A."Note":Note@,
@SELECT:METRIC:USER_DEF:IMPLIED:A."Manager_Name":ManagerName@,
@SELECT:METRIC:USER_DEF:IMPLIED:A."PM_Name":PMName@
FROM CLARITY.ALLDATA A
WHERE (@WHERE:PARAM:USER_DEF:INTEGER:Dept@ IS NULL OR @WHERE:PARAM:USER_DEF:INTEGER:Dept@ = A."DepartmentID")
AND @FILTER@

Outcomes