Custom Picker array Error

Certified Associate Developer

I have created these two below 

Expression : 

a!localVariables(
local!matches: where(
a!forEach(
items: ri!labels,
expression: search( ri!filter, fv!item)
)
),
a!dataSubset(
data: index( ri!labels, local!matches),
identifiers: index( ri!identifiers, local!matches)
)
)

UI Snippet : 

a!localVariables(
local!pickedState,
local!stateLabels: { "Alabama", "Alaska", "Arizona", "Arkansas", "California", "Colorado", "Connecticut", "Delaware", "Florida", "Georgia", "Hawaii", "Idaho", "Illinois", "Indiana", "Iowa", "Kansas", "Kentucky", "Louisiana", "Maine", "Maryland", "Massachusetts", "Michigan", "Minnesota", "Mississippi", "Missouri", "Montana", "Nebraska", "Nevada", "New Hampshire", "New Jersey", "New Mexico", "New York", "North Carolina", "North Dakota", "Ohio", "Oklahoma", "Oregon", "Pennsylvania", "Rhode Island", "South Carolina", "South Dakota", "Tennessee", "Texas", "Utah", "Vermont", "Virginia", "Washington", "West Virginia", "Wisconsin", "Wyoming" },
local!stateAbbreviations: { "AL", "AK", "AZ", "AR", "CA", "CO", "CT", "DE", "FL", "GA", "HI", "ID", "IL", "IN", "IA", "KS", "KY", "LA", "ME", "MD", "MA", "MI", "MN", "MS", "MO", "MT", "NE", "NV", "NH", "NJ", "NM", "NY", "NC", "ND", "OH", "OK", "OR", "PA", "RI", "SC", "SD", "TN", "TX", "UT", "VT", "VA", "WA", "WV", "WI", "WY" },

local!allAddress:{
ADDRESS_TEXT_ID:local!stateLabels,
ID:local!stateAbbreviations
},a!pickerFieldCustom(
label: "Pick address",
labelPosition: "ABOVE",
instructions: "",
helptooltip: "Start typing address text ID and address containing input string will be shown",
placeholder: "---Type address text ID ---",
maxselections: 1,
suggestFunction: rule!LIMSCN_SupplierArrayPickerFilter(
filter:_ ,
labels: index(local!allAddress,"ADDRESS_TEXT_ID",null),
identifiers: index(local!allAddress,"ID",null)
),
selectedLabels: a!forEach(
items:local!pickedState,
expression: index(index(local!allAddress,"ADDRESS_TEXT_ID",null), wherecontains(tointeger(fv!item), tointeger(index(local!allAddress,"ID",null))))
),

value:local!pickedState,
saveInto:local!pickedState,
validations: {}
)
)

And I am getting below error 

Interface Definition: Expression evaluation error at function a!pickerFieldCustom [line 9]: Cannot index "data" because it is an array type (List of Variant). Only fields with scalar types can be indexed from an array.

 

  Discussion posts and replies are publicly visible

Parents Reply Children
No Data