I Have a ValueChanged script on a tag and when string format function is within the code it completely breaks and fails to execute, not even the Gateway logs show any errors.
The following line wil make the ValueChange script unusable.
You basically cannot use modern python's .format() in tag events, as the curly braces are mis-interpreted. There is no work-around. Use classic % formatting instead.
That's the full code what wil break the working. The entire code is irrelevant to the problem.
There is an error but not shown/visible to the client and the gateway does not log the issue.
I had to find out why the SaveChange did not execute as expected.
I should also mention that you can avoid the problem by having your event be a one-liner that delegates to a function in the gateway scripting project's library. (You should do this for all events in Ignition anyways.)
format is a perfectly good method though, I use it everywhere and have never run into an issue, albeit I don't normally use identifiers in them. The updates to it in python 3 make it much nicer to use with f strings though
The only issue with it within change events is IA's code to parse it which fails for named parameters