I am working on an expression rule. In that rule, I need to get rows with null values as output. I am providing some map inputs like {username: test, fname: test1, lname: test2, email: test@gmail.com, username: test, fname: test1, lname: test2, email: ""}. I want to get the output as: {username: test, fname: test1, lname: test2, email: ""}. I am getting only null.However, I am unable to get the exact output. Can anyone help me out?.Thanks for your help in adavnce
a!localVariables( local!users: a!forEach( items: ri!users, expression: a!map( username: fv!item.username, firstname: fv!item.firstname, lastname: fv!item.lastname, email: fv!item.email ) ), local!nullValueUsers: a!forEach( items: local!users, expression: if( or( isnull(fv!item.username), isnull(fv!item.firstname), isnull(fv!item.lastname), isnull(fv!item.email) ), fv!item, null ) ), local!nulldataValueUsers: reject(fn!isnull, local!nullValueUsers), local!nulldataValueUsers ) ###rule input datatype- Map
Discussion posts and replies are publicly visible
If you are looking to identify the empty email field, isnull() does not help. isNullOrEmpty() might be what you are looking for.
For more insights on null checking: appian.rocks/.../
output still same :List of Text String - 1 item
Can you share a fully working example, including data?