reject(): drop blanks as well as nulls
Easy
Return the entries with both nulls and empty text removed.
fn!isnull is not enough here: an empty piece of text is not null, and it has to go too.
Input
ri!entries— List of Text
ri! Rule Inputs
ri!entriesList of Text{
"a",
"",
null,
"b"
}Example 1 — A blank and a null
Input: ri!entries
{
"a",
"",
null,
"b"
}Output:
{
"a",
"b"
}Example 2 — Nothing worth keeping
Input: ri!entries
{
"",
null
}Output:
{}Example 3 — All real entries
Input: ri!entries
{
"x",
"y"
}Output:
{
"x",
"y"
}Example 4 — Only blanks
Input: ri!entries
{
"",
""
}Output:
{}Appian Expression Tips
- • Use
ri!variableNamefor rule inputs - • Use
a!localVariables(local!x: …, body)for locals - • Use
a!forEach(items: …, expression: fv!item)to iterate - • Use
where()/reject(fn!isnull, list)to filter