It's possible that it TACTIC is caching the value and is pulling the value from the cache. The expression language is heavily cached and which will speed up repeated expressions considerably.
Try replacing this:
value = Search.eval(value, env_sobjects=env_sobjects)
with:
from pyasm.biz import ExpressionParser
parser = ExpressionParser()
parser.eval(value, env_sobjects=env_sobjects, use_cache=False)
I have try both of these code. both can't work.
from pyasm.biz import ExpressionParser
parser = ExpressionParser()
parser.eval(value, env_sobjects=env_sobjects, use_cache=False)
from pyasm.biz import ExpressionParser
parser = ExpressionParser()
value = parser.eval(value, env_sobjects=env_sobjects, use_cache=False)
Yes. I checked the code and the use_cache kwarg is not in 4.5. There is another way, but it is a bit of a blunt instrument. You can clear the entire expression cache using.
parser = ExpressionParser()
parser.clear_cache()
result = parser.eval(expr)
The only impact is performance if a large number of similar expressions are called. This is why the use_cache kwarg is better, but clear_cache is available in 4.5 and if isolated to ExpressionValueWdg, it's not so bad.