Clarity: The list of custom instances doesn't show an attribute value that is made by query lookup with parameter.
search cancel

Clarity: The list of custom instances doesn't show an attribute value that is made by query lookup with parameter.

book

Article ID: 51771

calendar_today

Updated On:

Products

Clarity PPM SaaS Clarity PPM On Premise

Issue/Introduction

Description:

Details:

The list of custom instances doesn't show an attribute value that is made by query lookup with parameter. The parameter is linked to the [--Object ID--] of the same object instances.

The lookup lets us choose the value in the edit mode, but the value disappears after saving this value. The value is saved correctly and can be displayed in instance properties.

Steps to Recreate:

  1. Define the master object "obj1"

    1. Go to the Admin Tools -> Objects and click the "New" button

    2. Enter the requested information (Object Name = "obj1", Object ID = "obj1")

  2. Define the Subobject "obj2" of the master object "obj1"

    1. Go to the Admin Tools -> Objects and click the "New" button

    2. Enter the requested information (Object Name = "obj2", Object ID = "obj2", Subobject -> Master object "obj1")

  3. Create the lookup that displays the instances of subobject "obj2"

    1. Go to Admin Tool -> Lookup and click the "New" button

    2. Enter the requested information (Lookup Name = "look1", Lookup ID = "look1", Source ->Dynamic Query -> Object = "obj2")

    3. Enter the query (below) and click "Save and Continue"

      select Distinct
      @SELECT:ID:[email protected],
      @SELECT:NAME:[email protected]
      FROM
      ODF_CA_OBJ2
      where 1=1
      AND @[email protected]
      AND ID = @WHERE:PARAM:USER_DEF:INTEGER:[email protected]

    4. Set up Hidden Key = "id" and Display Attribute ="Name" amd click "Save and Exit"

  4. Define the custom attribute base of the lookup "look1"

    1. Go to Admin Tools -> Object -> "obj2" -> Attribute and click "New"

    2. Enter requested information (Attribute Name = "Att1", Attribute ID = "Att1", Data Type = "Lookup", Lookup = "look1")

    3. Set up the Lookup Parameter to [--Object ID--]

    4. Click Submit

    5. Place the attribute "att" on (View -> General -[Layout: Edit] and View -> obj2 List [Layout])

  5. Test the behavior

    1. Go to Home -> Custom Objects -> obj1 and create a new instance "test1"

    2. Open the instance "test 1" and add two new sub instances in obj2 list page of "test1" properties

    3. Change the obj2 list to the Edit mode and enter the values to the attribute "att1"

    4. Click "Save"

Expected Result: The values should be saved and displayed in the "Obj2-List" List View.

Actual Result: The values are saved but the "Obj2-List" doesn't show these values.

Solution:

This is not a defect. The query that was used in the lookup has to be modified to get the desired result.

Modify the NSQL query:

  select Distinct
       @SELECT:ID:[email protected],
       @SELECT:NAME:[email protected] 
  FROM 
       ODF_CA_OBJ2 
  where 1=1 
  AND @[email protected] 
  AND (@WHERE:PARAM:USER_DEF:INTEGER:[email protected] IS NULL OR 
@WHERE:PARAM:USER_DEF:INTEGER:[email protected] = ID)

Keywords: CLARITYKB, CLRT-52535, NAB, studio

Environment

Release:
Component: STUDIO