Dynamic lookup attribute not populating decimal values in MUX

book

Article ID: 219748

calendar_today

Updated On:

Products

Clarity PPM SaaS Clarity PPM On Premise

Issue/Introduction

We have a parameterized dynamic lookup based attribute which provides decimal numbers to be saved into specific instances. However, when selecting these values, the following error is thrown in the Modern UX:

CMN-0008: Attribute 'some_attirubte_id' data type is incorrect

The following error is noticeable in the app-ca.log:

ERROR 2021-21-21 09:09:16,007 [http-nio-8082-exec-155] rest.validation (clarity:[email protected]:61145097__AF7C-8E26-4493-ACD1-ADA4B85635E3:PPM_REST_API) ExceptionInfo ::  Could not update resource. Resource name: teams. Error code: validation.dataTypeInvalid Error message: CMN-0008: Attribute 'some_attribute_id' data type is incorrect.
ERROR 2021-21-21 09:09:20,805 [http-nio-8082-exec-159] object.AttributeImpl (clarity:[email protected]:61145097__AF7C-8E26-4493-ACD1-ADA4B85635E3:PPM_REST_API) number attribute: some_attribute_id with value(37.5) of type: java.lang.String
java.lang.Exception: here
 at com.niku.odf.object.AttributeImpl.validateDataType(AttributeImpl.java:1908)

Cause

The dynamic lookup's SQL query is written in such a way that it can return values other than numbers sometimes.

Environment

Version: 15.9.1

Resolution

Select a column such as "ID" from tables within the Clarity data model, where you would be sure that the data type of values returned would always be a number. And use that for the "ID" field of lookup values.