AnsweredAssumed Answered

I need to add OBS Units and Descendants to a NSQL

Question asked by mscann on Jan 21, 2013
Latest reply on Jan 21, 2013 by mscann
Hi

I have some code that was developed by someone else. The code is to a custom Portlet and when the User selects a particular OBS in this Portlet, that should return data for all of the Applications (Projects) for that OBS – but in another custom Portlet is where the data is listed. However, it is only returning some Applications. I believe that I need to somehow add the OBS and Descendants. Any suggestions on if this is the case….and how to do so? Thanks for looking!

Here's a sample of the code:
WHERE a.id = b.id
AND b.is_active = 1 AND a.retirement_date is null AND b.odf_object_code = 'application' AND OU.TYPE_ID = 5000009 /*FUNCTIONAL OBS*/ AND A.ID = OBS.RECORD_ID
AND OBS.UNIT_ID = OU.ID AND OU.ID = E.UNIT_ID AND( E.BRANCH_UNIT_ID IN (SELECT ID FROM PRJ_OBS_UNITS WHERE PARENT_ID = 5000188 /*IT Units*/)
OR E.BRANCH_UNIT_ID IN (5000841,5001610,5001882)
AND f.id = a.id

Outcomes