Hi Samos,Ok.. I read the other post and I added the following into my nsql for the lookup and clicked save: select
@SELECT:pb.id:id@,
@SELECT:pb.name:name@,
@SELECT:pb.project_id:project@,
@SELECT:ii.name:project_name@,
@SELECT:ii.code:project_code@,
@SELECT:CASE is_current WHEN 1 THEN '*' ELSE ' ' END:is_current@
from prj_baselines pb
INNER JOIN inv_investments ii
ON pb.project_id = ii.id
where ii.is_active=1
and ii.id = @WHERE:PARAM:USER_DEF:INTEGER:ProjectID@ /* note: I also tried adding the @BROWSE:ONLY ... :BROWSE:ONLY@ and also put IS NULL at the end, both gave me errors Then I copied the following query (I did not create this, it was created by a former employee) that references the lookup: SELECT @select:dim:user_def:implied:task:task_int_id:task_int_id@,
@select:dim_prop:user_def:implied:task:task_sequence:task_sequence@,
@select:dim_prop:user_def:implied:task:task_id:task_id@,
@select:dim_prop:user_def:implied:task:task_name:task_name@,
@select:dim_prop:user_def:implied:task:task_start:task_start@,
@select:dim_prop:user_def:implied:task:task_finish:task_finish@,
@select:dim_prop:user_def:implied:task:BASE_START:BASE_START@,
@select:dim_prop:user_def:implied:task:BASE_FINISH:BASE_FINISH@,
@select:dim_prop:user_def:implied:task:task_status:task_status@,
@select:dim_prop:user_def:implied:task:project_int_id:project_int_id@,
@select:dim_prop:user_def:implied:task:project_name:project_name@,
@select:dim_prop:user_def:implied:task:hg_has_children:hg_has_children@,
@select:metric:user_def:implied:base_usage:base_usage@,
@select:metric:user_def:implied:act_usage:act_usage@,
@select:metric:user_def:implied:etc_usage:etc_usage@,
@select:metric:user_def:implied:eac_usage:eac_usage@,
@select:metric:user_def:implied:cv_percent:cv_percent@
FROM
((SELECT v.task_id task_int_id,
v.task_sequence task_sequence,
v.task_code task_id,
v.task_name task_name,
t.prstart task_start,
@DBUSER@.cop_calc_finish_time_fct(t.prFinish) task_finish,
BASETASK.START_DATE BASE_START,
@DBUSER@.cop_calc_finish_time_fct(BASETASK.FINISH_DATE) BASE_FINISH,
v2.name task_status,
p.id project_int_id,
p.name project_name,
case
when (select count(*) from prtask where prtask.wbs_parseq = t.prwbssequence) > 0
then t.prwbssequence
else null
end hg_has_children,
SUM(NVL(r.USAGE_SUM,0)) base_usage,
SUM(NVL(r.prActSum,0)) act_usage,
SUM(NVL(r.prEstSum,0)) etc_usage,
SUM((NVL(r.prActSum,0)+NVL(r.prEstSum,0))) eac_usage,
CASE WHEN SUM(r.USAGE_SUM) = 0
THEN 0
ELSE ((SUM((NVL(r.prActSum,0)+NVL(r.prEstSum,0))) - SUM(r.USAGE_SUM)) /
SUM(r.USAGE_SUM)) * 100 END cv_percent
FROM cop_phase_rollup_v v
INNER JOIN srm_projects p ON v.project_id = p.id
INNER JOIN prtask t ON v.task_id = t.prid
LEFT OUTER JOIN cmn_lookups_v v2 ON t.prstatus = v2.lookup_code
AND v2.lookup_type = 'prTaskStatus' AND v2.language_code = 'en'
LEFT OUTER JOIN cop_proj_task_assign_v x ON v.project_id = x.project_id AND v.task_id = x.task_id
LEFT OUTER JOIN PRJ_BASELINE_DETAILS BASETASK ON t.prid=BASETASK.OBJECT_ID
AND 'TASK' = BASETASK.OBJECT_TYPE
AND @WHERE:PARAM:USER_DEF:INTEGER:BASEREC_ID@ =BASETASK.BASELINE_ID
LEFT OUTER JOIN PwC_Effort_Rollup_Vw r ON t.prid = r.id
AND BASETASK.BASELINE_ID = r.baseline_id
WHERE
(p.id = @WHERE:PARAM:XML:INTEGER:/data/id/@value@)
AND (@WHERE:SECURITY:PROJECT:p.id@)
AND NVL(@where:param:user_def:string:hg_row_id@, 0) =
(case when t.prwbslevel=1 then 0 else t.wbs_parseq END)
GROUP BY v.task_id
, v.task_sequence
, v.task_code
, v.task_name
, t.prstart
, t.prfinish
, BASETASK.START_DATE
,BASETASK.FINISH_DATE
, v2.name
, p.id
, p.name
, t.prwbssequence
)
)
WHERE @FILTER@ Then I clicked on the attributes screen and then clicke don param_baserec_id and selected it's properties, I then defined it as a lookup - numeric and selected the lookup I had definined earlier... Now on one of the posts you state: For lookups you should use a parametrized lookup - use: @WHERE:PARAM:USER_DEF:INTEGER:ProjectID@ Then when you assign this lookup to an attribute, do not hit submit - hit save - you will notice a new mapping field will show up in your page - one that will allow you to link your parameter (ProjectID in the above example) to a field in the table where you're creating a new attribute. By the way - this is available from Clarity r8 on, not previous versions... I do not see any new mapping field that shows up on the page when I click save?? I am running version 8.1.0.03.4373. Help! :) Thanks! Aron Elston