Hi,
Is there a way to use local variables in a rule that is used in reduce function When called from UI?
When Using from UI it says that I need to configure refreahalways for the local variable .....
Thaks in advance,
Gil
Discussion posts and replies are publicly visible
the information is pretty limited. can you tell as about your overall use case? perhaps reduce() is not the right fit :)
That's pretty simple. a!localVariables does not re-evaluate local variables by default when used inside reduce(). To make this work, you need to declare the value of the local using a!refreshVariable and set refreshAlways to true.
Thanks Stefan!
Can you give an example? just how to declare the a!refreshVariable in the right context ?
Thanks
Hi Richard,
I am doing Shpitzer clearing schedule.
For that I need to use values from previous iterations.
To my understanding the only way to get results from previous iteration is with reduce.
It works by the way - I just wasnt able to use local variables which made me repeat calculations...
Thanks,
Your predicate expression has local variables. Update these similar to that example.
docs.appian.com/.../Local_Variables.html
I will try what is written there
Thanks very much,
It's working.