Camunda DMN

I have an arraylist as below:
“targetCustomerId”: 1296,
“targetCustomerDesc”: “Ngành nghề kinh doanh”,
“targetCustomerValue”: “ABC”
“targetCustomerId”: 1329,
“targetCustomerDesc”: “Đăng ký kinh doanh”,
“targetCustomerValue”: “DEF”
“targetCustomerId”: 1397,
“targetCustomerDesc”: “Đối tượng KH”,
“targetCustomerValue”: “GGG”
“targetCustomerId”: 1710,
“targetCustomerDesc”: “Chứng từ hoạt động SXKD mà KH có thể cung cấp”,
“targetCustomerValue”: “TTT”
“targetCustomerId”: 1716,
“targetCustomerDesc”: “Kinh nghiệm hoạt động kinh doanh”,
“targetCustomerValue”: “12”

In my dmn input column I use this expression to filter this list data
EventCriteriaTargetCustomerArrayList[targetCustomerId = 1397].targetCustomerValue
It work but I got the value is ‘[GGG]’ not ‘GGG’
What I need to change in my syntax to fix this problem? Thanks.

@Mason_John Could you upload your DMN model?

Here bro

@aravindhrs I attached dmn file. When you’re free let take a look. Thanks

Hi @Mason_John

Any of the following options should work

EventCriteriaTargetCustomerArrayList[targetCustomerId = 1397].targetCustomerValue[1]

EventCriteriaTargetCustomerArrayList[targetCustomerId = 1397][1].targetCustomerValue

I am assuming that a single element is always returned as a result of filtration

Here is the expression with the check

if count(EventCriteriaTargetCustomerArrayList[targetCustomerId = 1397]) = 1 then EventCriteriaTargetCustomerArrayList[targetCustomerId = 1397][1].targetCustomerValue else null

@hassang thanks I will try it

1 Like

Awesome. It’s work Thanks @hassang