I am trying to understand the working behaviour of foreach . i have tried this below code from appian doc.
a!forEach( items: {"January", "February", "March"}, expression: a!localVariables( local!month: fv!item, a!forEach( items: {1, 15}, expression: local!month & " " & fv!item ) ))
the code throws the below error.Kindly help.
Discussion posts and replies are publicly visible
By any chance, did you write this code directly in an Interface object? You foreach seems to be perfectly OK.
BTW, next time:
yes , i have directly written this code in interface. I will try insert code.Thanks for the response
Either put your code into an Expression object, or create a!textFields or a!richtextDisplayFields in the inner foreach.
Let me try. Is it possible to increment/decrement fv!item or fv!index ?
No. Appian expressions is a functional programming language with immutable variables. This is true for expressions in general and for interfaces during the user triggered state update cycle.
ok..thanks for the response