Hi All,
Is it possible to do a dpQuery to return the description, comment, or to just return the datapoint name of the queried datapoints?
I would like to monitor the number of datapoints that match a certain query using a dpQueryConnectAll and then trigger some action when the total number changes. Is this possible? The query would ideally connect to something that rarely changes?
Using 3.15 P013.
Thanks.
Is it possible to dpQuery datapoint descriptions?
Search
-
- Posts: 20
- Joined: Tue Oct 03, 2017 12:33 pm
Re: Is it possible to dpQuery datapoint descriptions?
Hi,
I think you cannot. Query is only for attributes saved in RAIMA and description is not, it is inside the dpidentification...
Maybe you can use :
int dpGetAllDescriptions(dyn_string &dps, dyn_string &descriptions [, string descriptionFilter [, string dpeFilter [, int mode]]]);
And make a dpConnect on the result.
BR
Alex
I think you cannot. Query is only for attributes saved in RAIMA and description is not, it is inside the dpidentification...
Maybe you can use :
int dpGetAllDescriptions(dyn_string &dps, dyn_string &descriptions [, string descriptionFilter [, string dpeFilter [, int mode]]]);
And make a dpConnect on the result.
BR
Alex
Re: Is it possible to dpQuery datapoint descriptions?
In the result of a dpQuery/dpQueryConnect you always get the name of the datapoint element in the first column of the result table.
Filtering for the comment in the query is not possible.
If you just want to know if the number of results changes you probably can do the query in a defined interval (e.g. once a day) and compare the number of results.
Then you do not have to make a queryConnect.
Best Regards
Leopold Knipp
Senior Support Specialist
Filtering for the comment in the query is not possible.
If you just want to know if the number of results changes you probably can do the query in a defined interval (e.g. once a day) and compare the number of results.
Then you do not have to make a queryConnect.
Best Regards
Leopold Knipp
Senior Support Specialist
-
- Posts: 634
- Joined: Mon Aug 02, 2010 10:37 am
Re: Is it possible to dpQuery datapoint descriptions?
Perhaps you should consider upgrading to 3.16. It has a new function 'sysConnect', which allows you to connect to dpDescription changes. The callback function could be used to update the total number.
-
- Posts: 20
- Joined: Tue Oct 03, 2017 12:33 pm
Re: Is it possible to dpQuery datapoint descriptions?
Thank you for your replies.
I cannot upgrade to 3.16 on my current project, but sysConnect sounds like a useful function to use in the future.
As it's for a table on a graphic, I don't think it's worth doing an interval check since it's unlikely to be open for a large amount of time. Though I will try that method for other problems.
Best Regards,
Louis
I cannot upgrade to 3.16 on my current project, but sysConnect sounds like a useful function to use in the future.
As it's for a table on a graphic, I don't think it's worth doing an interval check since it's unlikely to be open for a large amount of time. Though I will try that method for other problems.
Best Regards,
Louis