Expression evaluation error at function 'union' Cannot compare type[]

Certified Senior Developer

Hi,

I have a dictionary as below -

a!localVariables(
local!data: {
{
col1: 1,
col2: "N1",
col3: "A1",
col4: "S1"
},
{
col1: 2,
col2: "N2",
col3: "A2",
col4: "S2"
},
{
col1: 3,
col2: "N1",
col3: "A1",
col4: "S3"
}
},
local!data
)

I want a result that comes up post running this code  -

a!localVariables(
local!data: {
{ col1: 1, col2: "N1", col3: "A1", col4: "S1" },
{ col1: 2, col2: "N2", col3: "A2", col4: "S2" },
{ col1: 3, col2: "N1", col3: "A1", col4: "S3" }
},
local!commonData: a!forEach(
items: local!data,
expression: {
data: index(
local!data,
wherecontains(
merge({ fv!item.col2 }, { fv!item.col3 }),
merge({ local!data.col2 }, { local!data.col3 })
),
{}
)
}
),
union(local!commonData,local!commonData)
)

But I am getting error Expression evaluation error at function 'union' Cannot compare type[], that to only for 1 record among dictionary. If I remove that record it works fine. I have checked that record it same as other dictionaries but still it is throwing this error

  Discussion posts and replies are publicly visible