Lookup values display for Active and Inactive in UI and filter
search cancel

Lookup values display for Active and Inactive in UI and filter

book

Article ID: 237463

calendar_today

Updated On:

Products

Clarity PPM On Premise Clarity PPM SaaS

Issue/Introduction

You have set up a custom attribute - Dynamic lookup showing instances of an object. You are seeing some of the below behaviors: 

  • Lookup value disappears after being saved 
    • After setting the value for the lookup attribute, the value disappears from both the available results (expected) and the attribute value (not expected). When checking the database, the value is correctly saved for the lookup attribute.
  • Lookup shows all entries on filtering instead of showing just Active entries
    • After setting the value for the lookup attribute, the Inactive value is correctly saved and displayed in UI on the attribute. However when filtering, all values are shown, both Active and Inactive, so users can pick a wrong value

How to configure the lookup so it filters the values? You need both Active and Inactive values to show saved in UI on the attribute,  but once the users filter, they would like to see only Active Lookup values

Environment

All Supported Clarity Releases

Cause

The lookup code does not contain a BROWSE-ONLY clause or the construct is not correct

Resolution

You have to use BROWSE-ONLY in the query for your dynamic lookup to allow for this functionality. This is valid for both Browse and Pull Down lookups

BROWSE-ONLY will make the condition apply only when selecting (browsing) new values, but not when displaying current existing values.

An example of using the BROWSE-ONLY construct:

SELECT ...
FROM ...
WHERE @FILTER@
@BROWSE-ONLY:
AND IS_ACTIVE = 1
:BROWSE-ONLY@

Note: You have to make sure you update the lookup when not in use or use XOG to apply the changes to the lookups

Additional Information

Configure Lookups > BROWSE-ONLY Construct for Dynamic Query Lookups