Nested index() issue in User Interface "Design Mode"

Certified Senior Developer

Hi all,

I have encountered an issue in an interface while switching from expression mode to design mode in Appian. The issue is mainly cause of nested indexing (An alternate approach that I have used in UI). Below are 2 code snippets, while switching to design mode, the second snippet causes the error to appear.

I am trying to use a single index() instead of nested index(), is there any sort of performance difference between these two approaches, or any benefit of one over the other?

a!localVariables(
  local!list: {
    a!map(key: "test1"),
    a!map(key: "test2"),
    a!map(key: "test3")
  },
  a!textField(
    value: index(index(local!list, 1, {}), "key", {})
  )
)
/* Works well */

a!localVariables(
  local!list: {
    a!map(key: "test1"),
    a!map(key: "test2"),
    a!map(key: "test3")
  },
  a!textField(value: index(local!list, 1, "key", {}))
)
/* Gives error in switching to design mode */

Error:

Cannot switch to Design Mode

The function 'index' [line 7] has 3 parameter(s), but instead passed 4 parameter(s).

  Discussion posts and replies are publicly visible

Parents
  • +1
    Certified Lead Developer

    This way of using index function is neither recommended nor documented by Appian and you should also avoid using it as there is no certainty when it will get removed or stop working. According to Appian, it can take only 2, or at most 3 parameters including the default and no more. This is the reason why Design mode is not able to handle this situation.

Reply
  • +1
    Certified Lead Developer

    This way of using index function is neither recommended nor documented by Appian and you should also avoid using it as there is no certainty when it will get removed or stop working. According to Appian, it can take only 2, or at most 3 parameters including the default and no more. This is the reason why Design mode is not able to handle this situation.

Children
No Data