List with 2 items but length says it only has 1

Appian says I have a List of Text with 2 items, but when I try to get its length it says it has only 1 item.

I need to do a flatten here to achieve the right response with 2 items and its type is not even a List of List of Text.

Code for reference:

a!localVariables(
  local!test: index({ code: { "A", "B" } }, "code", null),
  length(local!test)
)

Am I doing something wrong here ? I'm really not getting it :/

For me seems Appian is interpreting the type wrong here because of its dynamic typing and even if it says the list has 2 items on the local variables, the interpreter is doing something different.

From time to time we are facing little consistence issues like those and defects are being opened by QA and they take a lot of time for us to find out what the problem really is.

This is something so core to the platform that we assume that it's working, but here and there this kind of stuff keeps hapening.

We are needing to defend ourselfs against the platform because of this kind of stuff, but doing so we create a lot of unecessary overloads for the system.

This really wears us down :/

Really hope I'm doing something wrong here

  Discussion posts and replies are publicly visible

Parents Reply Children
No Data