Clarity: A Multi-Value Lookup attribute is generating a system error on the layout edit page when values are selected and saved.
search cancel

Clarity: A Multi-Value Lookup attribute is generating a system error on the layout edit page when values are selected and saved.

book

Article ID: 50726

calendar_today

Updated On:

Products

Clarity PPM SaaS Clarity PPM On Premise

Issue/Introduction

Description:

We created a dynamic query lookup and attached it to a multi-value lookup attribute on the Incident Object.
When this attribute is placed on the Incident [Layout:Edit] page and one or more values are selected and saved, the page generates a red system error message.

Steps to Reproduce:

  1. Login to Clarity as an Administrator

  2. Admin Tool > Data Administration: Lookups > click 'New' button to create a new lookup
    Lookup Name: myIncidentLookup
    Lookup ID: myIncidentLookup
    Lookup Type: Dynamic Query
    Lookup Query: Select incident_code, subject from imm_incidents
    Click 'Save and Continue' button

  3. Parent Window
    Hidden Key = incident_code
    Display Attribute = subject

  4. Admin Tool > Studio Objects: Incidents > Attributes
    Click 'New' button
    Attribute Name: myIncidentMVL
    Attribute ID: myincidentmvl
    Data Type: Multi Valued Lookup - String
    Lookup: myIncidentLookup
    Click 'Submit' button

  5. Object Definitions: Views > Incident Properties [Layout:Edit]
    Add 'myIncidentMVL' attribute to the Edit properties page
    Click 'Submit' button

  6. Main Application > Incidents
    Open an existing Incident
    Select 1 or more values for the new attribute
    Click 'Save' button

Expected Result: No error should appear
Actual Result: Red System Error message appears. App-Niku.Log file shows the following error message:

ERROR 2011-01-11 01:28:41,867 [http-80-Processor13] niku.xql2 (admin:13224894__-d90e892:itl.incidentObjectSaveU)
Internal Processing exception java.lang.IndexOutOfBoundsException: Index: 2, Size: 2 ...

Solution:

The error message is generated because the Lookup Query definition is not constructed properly.

  1. Login to Clarity as an Administrator

  2. Admin Tool > Data Administration: Lookups > search for 'myIncidentLookup'

  3. Modify the query as follows:

    SELECT @SELECT:incident_code:[email protected],
    @SELECT:subject:[email protected]
    FROM imm_incidents
    WHERE @[email protected]

  4. Main Application > Incidents
    Open the same Incident used earlier where values were selected and saved.
    No error message appears and the previously saved values appear in the field.

Environment

Release: ESPCLA99000-12.1-Clarity-Extended Support Plus
Component: