Dynamic Lookup Value Instance remains in DB even if the source is deleted
search cancel

Dynamic Lookup Value Instance remains in DB even if the source is deleted

book

Article ID: 373572

calendar_today

Updated On:

Products

Clarity PPM On Premise

Issue/Introduction

When using a dynamic lookup where it is possible to delete an entry so it is removed from the lookup, retains the value in the related object odf table but is cleared from the UI.

An example would be creating a dynamic query that uses tasks (prtask table)

  1. Create the dynamic lookup where there is a possibility of a value being deleted from the database.
  2. Create an attribute associated to this lookup.  This example is using Project object, but it could be any object.
  3. Add the attribute to the properties page (in Classic) or Blueprint (in Mux) to the appropriate object.
  4. On your project select a task value for the attribute.
  5. Delete the task selected  from the task list.

The UI will blank out the value. However the associated odf table, in this example the odf_ca_project table retains the value.

Resolution

This is the expected behavior.

Once you commit that record for your project instance to the database, it remains.  There is no association in the database back to the task, it only retains the ID or whatever field you have chosen as the hidden key on the lookup.

However, when the ID is trying to link back to the task based on the lookup used for the attribute, there is no value to match in the prtask table.  Therefore the value is blank in the UI.

 

 

 

Additional Information

In order to validate a record before deletion an enhancement to Clarity would be needed.

Here is a link to that information

Enhancement Requests for Clarity