Skip to main content
ankushs0002
Known Participant
June 13, 2024
Solved

Value is not refreshing after using refresh variable

  • June 13, 2024
  • 4 replies
  • 0 views

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..

Best answer by stefanhelzle0001

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
June 13, 2024

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

ankushs0002
Known Participant
June 13, 2024

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
June 13, 2024

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.