Skip to main content
ankushs0002
Known Participant
Jun 13, 2024 8:09 AM UTC
Solved

Value is not refreshing after using refresh variable

I am getting this error while i used refresh variable to refresh the value based in the variable change. 

Expression evaluation error [evaluation ID = c66ea:0543a] in rule 'mtc_griditemtotal' (called by rule 'mtc_formworkorderapproval') at function a!refreshVariable [line 31]: a!refreshVariable may only be used to define a local variable within the a!localVariables function.


Please check the screenshot. Please let me know if you have solution for this..

stefanhelzle0001
Brainy
Jun 13, 2024 8:30 AM UTC

I do not really understand the intention here, but you can make the value parameter AND the refreshOnVarChange parameter conditional. And that should give you the exact same logic.

4 replies

stefanhelzle0001
Brainy
Jun 13, 2024 8:15 AM UTC

I think the issue is, that you wrapped a!refreshVariable() into if(). Why not move the if() to the value parameter?

ankushs0002
Known Participant
Jun 13, 2024 8:26 AM UTC

So we can not put refreshVariable into if right ? but i have an requirement to wrap it otherwise it is affecting the flow.

stefanhelzle0001
Brainy
Jun 13, 2024 8:30 AM UTC

I do not really understand the intention here, but you can make the value parameter AND the refreshOnVarChange parameter conditional. And that should give you the exact same logic.