API-1006 error when clearing field values associated with parametrized lookups from Modern UX
search cancel

API-1006 error when clearing field values associated with parametrized lookups from Modern UX

book

Article ID: 399368

calendar_today

Updated On:

Products

Clarity PPM On Premise Clarity PPM SaaS

Issue/Introduction

Parameterized lookup logic used to filter params that are not null is found to be not allowing users to clear associated attribute values in modern UX

Steps to Reproduce: 

  1. Create a custom object enabled for API

  2. Create a string attribute A with API alias filled
  3. Create a lookup with code as follows
     
    select @SELECT:code:code@

    ,@SELECT:name:name@

    from

    (

    select lookup_code code,name

    from cmn_lookups_v clv

    where language_code=@WHERE:PARAM:LANGUAGE@

    and lookup_type='RPT_YES_NO'

    AND LOOKUP_CODE='0'

    UNION

    select lookup_code code,name

    from cmn_lookups_v clv

    where language_code=@WHERE:PARAM:LANGUAGE@

    and lookup_type='RPT_YES_NO'

    AND LOOKUP_CODE='1'

    and @WHERE:PARAM:USER_DEF:STRING:A@ is not null

    ) X

    WHERE @FILTER@
  4. Create a lookup attribute B, and associate it with the lookup

  5. Create an instance for the custom object page from Modern UX

  6. Add attribute A to the columns and enter any value

  7. Try clearing the value for attribute A

Expected Results: 

Value for attribute A is cleared

Actual Results:

API-1005: the value '''' for attribute 'param_a’ is not in expected format or invalid

Cause

DE170640

Resolution

DE170640, in review by engineering. 

Workaround: 

From the lookup code, replace

and @WHERE:PARAM:USER_DEF:STRING:A@ is not null

With

and '@'||@WHERE:PARAM:USER_DEF:STRING:A@ !=‘@‘