Skip to main content
sanjuktab2257
April 30, 2025
Question

Declare and append values to local variable

  • April 30, 2025
  • 3 replies
  • 0 views

Is there a way to declare an empty array as a local variable (local!a)  --> Perform some operations in another local variable(local!b) and append the results to local!a.





3 replies

stefanhelzle0001
May 1, 2025

No. Variables in Appian are immutable, following the functional paradigm of the SAIL expression language. But you can just create a new variable holding the values. And, you do not have to declare a local variable, just to define the output of your expression.

mikes0011
Brainy
May 1, 2025

As Stefan mentioned already, no.  You're thinking about it backwards.  There's no need at all to "declare" an empty value for "a" if you're just going to go on and perform some calculations:  perform your calculations first, then declare your local variable based on that result.

sanjuktab2257
May 2, 2025

Thank you [mention:a11f77a729fb4db2af76b09948583328:e9ed411860ed4f2ba0265705b8793d05]  and [mention:b45a4f6a20b14a008e4e0ec732a8bf98:e9ed411860ed4f2ba0265705b8793d05] , That was helpful. The above example is just a protype that I had created. The expression is quiet complex in the original code.