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
  • 0
    A Score Level 1
    in reply to David Gale

    Understood. Thanks for the answer.



    Just a sugestion:

    I know Appian is a low code platform and meant for everyone to be able to use it to build what they need to.

    But I think it's good to explicit this kind of technical information, if possible of couse, because they can help us technicians to guide the team with good practices easier. But I know that this can be confusing for preople without the proper background in programming and computer science. Maybe a more technical section of the documentation suffies this.



    But again, thanks for your time helping me, your answer was very very precise and clear.

Children