AnsweredAssumed Answered

NSQL Lookup with Parameter

Question asked by Lowell on Jan 19, 2017
Latest reply on Jan 24, 2017 by Lowell

Hi All,

I'm stuck on this one.  I'm trying to make a NSQL lookup on Risk Object to give the option of another SubObject of Project.

For example, I have under a Project X, Releases 1, 2, 3, 4, 5

On the risk, I only want to see results for the lookup in Risk on Project X, releases 1, 2, 3, 4, 5

 

Object:

Project

 

Subobject:

Risk

Release

 

Lookup:

on Risk, needs to pull Release Items connected with the Project.

 

Question 1:  How do I return the ID of the Parent object?

 

Question 2: What is wrong with this query where it's returning no data?

SELECT  DISTINCT
@SELECT:RI.PK_ID:ID@,
@SELECT:REL.TRG_REL_NAME:REL_NAME@,
@SELECT:REL.LAST_UPDATED_DATE:LAST_UPDATED_DATE@,
@SELECT:'en':LANGUAGE_CODE@

FROM    odf_ca_trg_release_obj REL
INNER JOIN RIM_RISKS_AND_ISSUES RI ON REL.ODF_PARENT_ID = RI.PK_ID

WHERE  
(@WHERE:PARAM:USER_DEF:STRING:PROJ_ID@ = RI.PK_ID)

AND REL.TRG_REL_STAT = 'trg_active'
AND     @FILTER@

Outcomes