Bindings with NamedQuery still works after NamedQuery moved to different folder or renamed

Perspective MAP ExpressionStructure binding with ScriptTransform containg system.db.runNamedQuery() still works after NamedQuery moved to different folder or renamed

Hi everyone
I am currently working on a project where I built a perspective map with a lot of interactions on poligons and views
For almost all of them I use bindings where I built scripts that populate all elements of the specific array.
for example|: Map.PROPS.layers.vector.polygon[2].polygons has a binding that creates the array elements

All my scripts works fine, but:

system.db.runNamedQuery('/,<>queryparameters) still works after NamedQuery moved or renamed

the option of Cache Query Results is disabled and was never enabled yet while under development

can anyone advise why after renaming the Named Query or moving it to another folder ALL the bindings with ExpressionStructure and Script transofrm (that contains the system.db.runNamedQuery) still works both in Designer RunMode and web browser?

Even in Edit Binding: Map.props.vector.polygon[2].polygons the browsing preview or the script has no errors or warnings when the namedQuery is no longer there.

My problem is that I intentionally renamed and moved to different folders some NamedQueryes, and even if I do not change the scripts with runNamedQuery in the bindings, the project still works.

For cases where my binding type is with retur formt , in the edit binding I see a red X near the path and the BindingPreview shows . But even in this case, the array with defective binding still works as nothing changed and repopulates with more or fewer elements as I interact with the map elements.

Looks like as if in this case (when using bindings with NamedQueryes), the bindings scripts does not change until they are valid and somehow it remembers the last working binding. But ihis does not explain how it remembers all the results from the NamedQuery with all of its parameters that chahge with each interaction.

Even more!:
The bindings where I use ExpressionStructure binding with ScriptTransform the system.db.runNamedQuery() is called in a for loop with changing parameters, and in that loop I use another for loop with another runNamedQuery() that calls a different NemedQuery also with changing parameters. And after renaming or moving one or both NamedQueryes the project still works without any Cache Query Results enebled.

I use ex: self.getSibling("Map").refreshBinding("props.layers.vector.polygon[2].polygons") around the project with sucess, but when I rename or move NamedQuertes, even if I fire the events containg refreshBinding() nothing happens and the project still works, and I get no error mesaages even in designer (I noticed that if I make some script mistakes(not related to NamedQueryes), I get error messages only in designer when the script tryes to fire. in the browser however broken scripts simply does not run without any notifications(probably remote errors can be enabled, but that's not the subject in this post))

I can't recreate the problem on 8.1.31.

  • I created a named scalor query, SELECT now().
  • I call it from a button and write the result to a label. It works.
  • I move the query into a folder in Named Queries. It doesn't work.
    Query path 'Select1' not found in project 'Sandbox'.

Hi
I'm using 8.1.38
I just made a copy of the project and on the new copy
I just deleted the whole NamedQuery and the binded array still repopulates even for a queryBinding jsonFormat and Script Transform that has the red X at Path(because it does not exists), query parameters no longer visible and BindingPreview shows [ ] both at query and Script.

I do not call these scripts from anywhere. I have them bind to perspective array element(s)

OK. You have them bound to Perspective properties or custom properties?

Then why did you say in your first post?:

All my scripts works fine, but:
system.db.runNamedQuery('/,<>queryparameters) still works after NamedQuery moved or renamed


With the new information (property binding) I can recreate the problem:

  1. Create a scalor Named Query, SELECT now(). Save the project.
  2. On the view create property custom.sqlNow. Add a query binding to the named query and set polling to 3 sec.
  3. Monitor custom.sqlNow and you should see it update every 3 s.
  4. Move the named query into a folder and save the project.
  5. Observe that custom.sqlNow continues to update. (It shouldn't.)
  6. Examine the query binding. The red X - "Query does not exist" error is shown (but the query continues to execute).

I suspect that the binding has been added to a task queue somewhere deep inside Ignition and that it doesn't update until a new valid binding is given.

bound to properties

more precisely to a Map's PROPS.layers.vector.polygon[2].polygons but also to [3],[4] and [5]

Sorry If I miss lead you, I just wanted to say that I don't have a not working problem, but a problem that something works even if it should no longer work.

My main concern is that this way I might change something accidentally and bad consequences will appear no idea when in the future.

Wait a day and see if anyone has any ideas. If nothing happens then open a support or bug ticket.