Hi!I'm trying to filter out record where field 'value' is null, but it only gives the record of the first item, here's the code
local!validValues:ri!properties[where(a!isNotNullOrEmpty(ri!properties['recordType!{5ebb976a-556f-4033-b1d7-9e5976ab963d}MM Property.fields.{041a7f43-dfd1-4b07-aaed-48e305712f4e}value']))],
Any inputs?
Thank you
Discussion posts and replies are publicly visible
Here's an example with a map but the same logic applies.
a!localVariables( local!values: { a!map(id: 1, value: "1"), a!map(id: 2, value: "2"), a!map(id: 3, value: null) }, reject( a!isNullOrEmpty, a!forEach( items: local!values, expression: if( a!isNotNullOrEmpty(fv!item.value), fv!item, null ) ) ) )
Another option that avoids that clunky (IMHO) way of trying to use foreach to filter a list.
a!localVariables( local!values: { a!map(id: 1, value: "1"), a!map(id: 2, value: "2"), a!map(id: 3, value: null) }, index( local!values, where( a!forEach( items: local!values.value, expression: a!isNotNullOrEmpty(fv!item) ) ) ) )