I created a dynamic lookup based on a mapping in a custom object.
The problem: The lookup mapping ALWAYS selects just the first item in the list no matter what attribute you select on for the lookup.
What is the issue in this NSQL and mapping that would bring in the appropriate mapped values, but then only select the FIRST item in the list?
SELECT DISTINCT
@SELECT:odas.trg_rfa_base:code1@,
@SELECT:LKP2.NAME:Name2@,
@SELECT:odas.trg_rfa_dtl:code2@,
@SELECT:LKP.NAME:NAME1@
FROM ODF_CA_TRG_RSFORADJ_MAP_OB odas
inner join cmn_lookups_v lkp on odas.TRG_RFA_BASE=lkp.lookup_code
INNER JOIN cmn_lookups_v LKP2 on odas.TRG_RFA_DTL = LKP2.lookup_code
WHERE UPPER(lkp.lookup_type) = 'TRG_RFA_BASE_LKUP'
AND lkp.language_code = 'en'
AND (@WHERE:PARAM:USER_DEF:STRING:TRG_BASE@ = odas.TRG_RFA_BASE OR @WHERE:PARAM:USER_DEF:STRING:TRG_BASE@ IS NULL)
AND @FILTER@