Is it possible to dpQuery datapoint descriptions?

Discussion about recent product features & solutions!
Search

Post Reply
5 posts • Page 1 of 1
Lbortolozzo
Posts: 20
Joined: Tue Oct 03, 2017 12:33 pm

Is it possible to dpQuery datapoint descriptions?

Post by Lbortolozzo »

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.

User avatar
adaneau
Posts: 310
Joined: Tue Feb 21, 2012 9:49 am

Re: Is it possible to dpQuery datapoint descriptions?

Post by adaneau »

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

User avatar
leoknipp
Posts: 2926
Joined: Tue Aug 24, 2010 7:28 pm

Re: Is it possible to dpQuery datapoint descriptions?

Post by leoknipp »

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

Gertjan van Schijndel
Posts: 634
Joined: Mon Aug 02, 2010 10:37 am

Re: Is it possible to dpQuery datapoint descriptions?

Post by Gertjan van Schijndel »

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.

Lbortolozzo
Posts: 20
Joined: Tue Oct 03, 2017 12:33 pm

Re: Is it possible to dpQuery datapoint descriptions?

Post by Lbortolozzo »

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

Post Reply
5 posts • Page 1 of 1