Using a named query in a query tag

Is there any way to use a named query in query tag. I am required to use named queries, and I need to save the query values to a tag after I run the named query. I was planning to use a query tag, but I don’t see a way to use a named query in a query tag.

There is no direct way to have a query tag use a named query. The reason is because named queries are a project resource, and tags are outside of a project scope.

You’ll have to come up with another way to accomplish this.

What triggers the named query to run? Is it a scalar query or returning multiple values?

We will have the operator push a button. We may also have a script that runs every minute.

I would suggest that you use either a Gateway Tag Change Event, or a Gateway Timer Event, to run the script. Then you can use system.db.runNamedQuery() to run the named query, process the results, whatever they may be, and write the value(s) to tags as appropriate.

I ended up using a button on the view to run the named query and append the new data to the existing tag data. Thanks for your help!