Use direct tag value inside a Named Query in reporting module

Hey gang,
I’m just throwing this out there to see if anyone has any genius ideas…
Is there a way to add a tag value inside of a Name Query without using the parameters? like in a normal Query you can include the {tag path} and use the value.
The reason I’m asking is I have about 30 different values that I’d like to use in my query and really didn’t want to add 30 parameters to the named query.
Figured I ask and see if there is a work around that someone knows :grin:

Thank you as always!!!

This isn’t currently possible - the main reason being that doing our current expression-style parsing inside of named queries would re-open the security hole that they’re designed to close. However, one solution to that might be ‘default’ values for named queries - I’ll open a ticket and see if there’s something we could do there.

In the short term, you could probably just make a project/global script that runs your named query with all the requisite parameters, so that you don’t have to write out all the tag references anytime you want to use the query.

@PGriffith
Thanks Paul for the suggestion. My report, runs the Named Query and inputs the data in a report format and emails out a pdf file. I assume I can just add a script data source in data section of the report and pull in the data that my project script gets running the named Query and use that data to design the report correct?

Yes, exactly. A script datasource assigning a dataset to a key in the report should show up in the report designer exactly the same as a query/named query/tag history datasource.

This way I can still feed it the few parameters I need and at the same time my tag values are being used and I don’t have to remember to update them every time they change. this should work great.
Thank you.