AnsweredAssumed Answered

Add "BROWSE-ONLY" in an existing lookup

Question asked by ispa-consulting on Jan 31, 2012
Latest reply on Feb 3, 2012 by Dave
Hi all,
I have an issue with a dynamic lookup under Clarity 12.0.6.5471 generic_013 001.
The first version of this dynamic lookup doesn't care if the value was active or not; the lookup is used at task level :
" [size=5]@SELECT:LEVZ.BUDGETLEVELNAME:LEVZ_CODE@,
@SELECT:LEVZ.isactive:LEVZ_ACTIF@,
@SELECT:LEVZ.BUDGETLEVELNAME || ' (' || LEVZ.INV_TYPE_DESC || ' - ' || LEVZ.BUDGETLEVELDESC ||')':LEVZ_NAME@,
@SELECT:LEVZ.AREANAME:LEVZ_AREA@
FROM XTD_LEVELZ LEVZ,
ODF_CA_TASK ODF,
PRTASK PT,
ODF_CA_PROJECT ODF_P
WHERE @FILTER@
AND ODF.ID = @WHERE:PARAM:USER_DEF:INTEGER:ID@
AND ODF.ID = PT.PRID
AND PT.PRPROJECTID = ODF_P.ID
AND LEVZ.PROJID = ODF_P.projectid
AND LEVZ.AVAILABLE_PHASE IS NULL[size]
"

In the lookup, for the task1, the values displayed in the lookup : A (active 0), B (inactive -1).
B have been selected for task1

The lookup worked fine. But now we do not want allow the users to select an inactive (-1) value from the XTD_LEVELZ table;
as the record in the XTD_LEVELZ table can be active or not, we decide to use the browse-only option and modify the current lookup:
"[size=5] @SELECT:LEVZ.BUDGETLEVELNAME:LEVZ_CODE@,
@SELECT:LEVZ.isactive:LEVZ_ACTIF@,
@SELECT:LEVZ.BUDGETLEVELNAME || ' (' || LEVZ.INV_TYPE_DESC || ' - ' || LEVZ.BUDGETLEVELDESC ||')':LEVZ_NAME@,
@SELECT:LEVZ.AREANAME:LEVZ_AREA@
FROM XTD_LEVELZ LEVZ,
ODF_CA_TASK ODF,
PRTASK PT,
ODF_CA_PROJECT ODF_P
WHERE @FILTER@
@BROWSE-ONLY:
AND LEVZ.ISACTIVE = 0 :BROWSE-ONLY@
AND ODF.ID = @WHERE:PARAM:USER_DEF:INTEGER:ID@
AND ODF.ID = PT.PRID
AND PT.PRPROJECTID = ODF_P.ID
AND LEVZ.PROJID = ODF_P.projectid
AND LEVZ.AVAILABLE_PHASE IS NULL[size]
"

The @WHERE:PARAM:USER_DEF:INTEGER:ID@ parameter is associated to OBJECT ID on the field we have created on the task, field which is based on this lookup.

In the lookup, for the task1, the values displayed in the lookup : A (active 0).
But B is not displayed even if it has been saved previously for task1. It looks like the browse-only is applied always

the issue is the inactivated values in the record are always not displayed.
Is somebody have already see this and how it can be solved ?

Regards

Outcomes