Is there a way to create Named Procedures that can be called from event scripts in UDT tags?
Do you mean Named Queries or Stored Procedures, or are you just talking about defining a function in a script library and being able to call it?
I have an OPC TAG / UDT Tag and I need to have its Value Changed script access a database. It doesn’t matter to me if it calls directly into a stored procedure on the database or a Named Query in Ignition?
So what’s the issue you are having? Have you tried calling system.db.runNamedQuery or one of the other DB functions from a value change script?
You may need to set the gateway scripting project and make sure that your named queries are defined in that project if that’s the route you choose.
Yes. I tried calling an existing Named Query from a UDT event script yesterday. I thought it wasn’t working, and I thought it was an issue of scope, where the UDT event code could not see the named query in a project. Perhaps I was mistaken ha.
"folderName/myNamedQuery". . .
I see the first param is the name of the project. Is it your understanding that the UDT event code should be able to use / call runNamedQuery like this?
This is what I was looking for. Thanks!