I got this error when none of the interfaces or expression rules mentioned use the load() function, they all use a!localVariables(). Does anyone know why this error could still be appearing?
"Interface Definition: Expression evaluation error ... The load() function cannot be used within rules called by looping functions other than a!forEach(). Pass the necessary variables via rule inputs or use a!forEach()."
Discussion posts and replies are publicly visible
Can you perhaps provide some more detail about a rule that's experiencing this? Is it happening in cases where there's a big nested hierarchy, or in relatively simple rules too?
You know, I have seen this error before but haven't been able to replicate (or find) today. My setup did not contain any load() calls either, however little jostling of the code got rid of it. Very interested for a code snippet if you can provide, and I wouldn't be surprised if we could dig a bug out..
just as basic idea: does any of your called expression rules or interface components have any load?
Now that I think more on it, I think I may have seen behavior like this once when there was a localVariable configured to have "refreshOnReferencedVarChange" turned off (which makes it essentially like a load() variable)... of course I have no proof of this.
Yea, it is definitely something in that realm.. I can't seem to reproduce however, will need that code snippet to identify..
This is a bad error message, but I'm pretty sure the cause of it is usually using the function a!forEach inside of another looping function like reduce(). Any chance you are doing that?
© 2021 Appian. All rights reserved.