We have a page which has a custom variable bound via scripting to return some result, as we remove the binding and the variable itself the variable keeps reappearing among the custom variables.
Even if we rename the current view and create a new one with the same name the custom variables magically reappear and we have no way to avoid them from reappearing.
We have experienced the above behaviours with several views, the only thing in common of these views is having two or three custom variables with one depending on the result of the other.
It seems as if some binding indications inside the project are linked with the page name and there is no way to remove them.
We had some success in the past with closing the project → restarting the gateway → exporting and reimporting the view and some times the problem was fixed but we still have to figure out how to rapidly fix this problem.
Is there some known bug which is being worked on for this weird behaviour?
I’m positive because I just created a new View “MeterSerre” and it started creating the custom variables of its own, there are no gateway scripts which do something like this.
the name “custom_card_config_value” is found in another view which has bindings using the same variable name but I doubt this could influence my “MeterSerre” view.
ah its in the view, you will have to chenk the resources then.
can you look for view.json file in this folder (on the gateway)? (you will have to browser the file explorer to find it, it should probably look something like this depending where you installed ingition. C:\Program Files\Inductive Automation\Ignition\data\projects\ProjectName\com.inductiveautomation.perspective\views\Custom\146\MeterSerre\view.json
by the way in the mean time the custom variables don’t appear anymore when I reopen the designer and open the “MeterSerre” view, but I’m sure the problem is still there and will happen again in a few days frustrating us for some more hours.
Errata Corrige: it’s happening again, the view.json is still the same!
if they still reappear then it has to be some script somewhere… as there doenst seem to be any mention of a binding with those names inside the resource files.
the view.json wont update untill you save the project again, so it really s a script triggering it somewhere
Ok I asked for the help of a colleague and we troubleshooted and found the following:
If I created from my designer a new View with a different name “Pluto” the custom variables were created nevertheless so the problem is not limited to the name “MeterSerre” and it cannot be a script of ours because we never used the name “Pluto” for any view before.
My colleague opened from his designer the view “Pluto” but his custom variables are empty so the problem seems to be local to my designer.
The problem happened to him before with his designer which is older than mine so it’s not specific to my computer or my version of the designer.
opening and closing the designer has no effect on the problem but rebooting my computer and reopening the designer solved it for the moment.
All the above for us points to a bug with the designer which keeps some sort of cache of the bindings and for some mysterious reason sporadically behaves as described.
I hope someone from Inductive Automation can chime in to solve this issue.
Above my current version of the designer, notice this happened also with previous versions of the designer.
I will contact our italian distributor to see if he can get in touch with IA regarding this matter, in the meantime I wanted to see if anyone on the forum had maybe a solution or similar experience.
Thank you victor for your support.
What happens if you use the Find/Replace tool to look for instances of “custom_card”, “instance_meter”, and “card_instances”? Please make sure you’re looking in ALL Views and all of the Scripting areas. outside of Vision If this project is the child of a different project, then you might also need to look in the parent project.
Ok, I unconsciously stirred the entire development team here and we probably found the underlying bug, I’ll try to explain:
let’s say we have a binding on View1 which is an expression where one value is bound to a session variable “now_5_sec” which changes every 5 seconds: we need this to refresh every 5 seconds the configuration for reasons I need not explain (it would open a new topic which is not the point now).
Below a screenshot of such a binding:
this session variable by the way is defined as in the screenshot below:
Because the binding in View1 executes as soon as you open it in the designer the following happens: I open View1 and the binding starts writing to the variable custom_card_config in View1 every 5 seconds, I now create a new View2 keeping the other view running and the View2 is being populated
with the result of the other view which is running in the background.
We are quite confindent this is the problem because we can reproduce it with the above steps and we can kinda see how one script executing in one view could spoil another view if the designer doesn’t check for the view where it is currently executing.
I hope the above is clear, otherwise I can make a video.
What you’re describing is a known issue which has actually just been resolved in the last few days. I only remember it being present when both views had the same property names, but regardless of replication steps the fix is present in the 8.1.11 nightly available now.
Our problem happens regardless of property names, the first views writes it’s property names to the second view due to this property bound to a now(5000) expression.
I’ll take a look at the nightly build to see if the problem is solved and post an update here.
Thank you