I am working with a rule in Appian where I expect a consistent structure of List of Map, but I am seeing inconsistent data types in the output.a!localVariables( local!indexval: index( ri!userFilters, "userFilter", null ), local!filters: split(local!indexval, ";"), a!forEach( items: local!filters, expression: a!localVariables( local!valueStart: find("value=[", fv!item), local!valueBlock: if( isnull(local!valueStart), "", mid( fv!item, local!valueStart + 7, len(fv!item) ) ), local!cleanValueBlock: substitute(local!valueBlock, "]", ""), /*Values */ local!AccountName: if( find("name=AccountName", fv!item) > 0, a!forEach( items: split(local!cleanValueBlock, ","), expression: trim(substitute(fv!item, """", "")) ), {} ), local!ProductCategory: if( find("name=Product Category", fv!item) > 0, a!forEach( items: split(local!cleanValueBlock, ","), expression: trim(substitute(fv!item, """", "")) ), {} ), a!map( AccountName: local!AccountName, ProductCategory: local!ProductCategory ) ) ))expecting ProductCategory and Account name in single map
List of Map
Discussion posts and replies are publicly visible
rajeshp7374 said:{}
The {} come up as List of variant. To avoid having list of variants in the output cast these {} to string using tostring({}). That will give expected output.
After converting it into string Getting outputexpected :