Skip to main content
March 26, 2025
Solved

List of text string returning only first item

  • March 26, 2025
  • 2 replies
  • 0 views
Hi everyone,

I’m facing a behavior in Appian that I wanted to confirm is expected or not.

I have a List of Text String, and when I use it directly inside an if() condition, it seems to always returns the first item in the list.

Here’s a simplified example:
a!localVariables(
  local!boolenArr: { false },
  local!texts: { "A", "B" },
  if(local!boolenArr, {}, local!texts)
)

Is this expected behavior in Appian? I was expecting it to return all the items in local!texts. Just want to confirm if I’m missing something or if this is something we should be cautious about in expressions.

Thanks in advance!

Best answer by laurensw425805

There is a specific section in the documentation on this. See if() Function - Appian 25.1

2 replies

March 26, 2025

There is a specific section in the documentation on this. See if() Function - Appian 25.1

gayatria0439
March 26, 2025

hi [mention:45d1ff3fde5d4aea898326f61218c656:e9ed411860ed4f2ba0265705b8793d05] , When passed a list containing a single boolean and lists in the value parameters, only the first item of the selected list will be returned. if a single value is passed to the condition and there are lists in the value parameters, the entire list is returned.
Yes, we can find this in the documentation, as Laurens mentioned.