dpConnect() - call callback function only when DPE changes value from 0 to 1

Find and share HowTos to various installations / configurations!
2 posts • Page 1 of 1
riso77
Posts:16
Joined: Mon Jan 15, 2018 10:57 am

dpConnect() - call callback function only when DPE changes value from 0 to 1

Post by riso77 »

Hello,

I wonder if there is an ellegant way of calling a callback function only if the DPE value (bool) changes from false to true (or vice versa), so that the callback function is not being called each time the DPE changes.

thanks
Richard

leoknipp
Posts:2928
Joined: Tue Aug 24, 2010 7:28 pm

Re: dpConnect() - call callback function only when DPE changes value from 0 to 1

Post by leoknipp »

With a dpConnect() the work function is called every time. There is no possibility to add a condition.
At the beginning of the work function you can check the value and call return; if no further steps shall be processed.

When using a dpQueryConnectSingle/dpQueryConnectAll you can define with a WHERE condition when the work function shall be called.

Best Regards
Leopold Knipp
Senior Support Specialist

2 posts • Page 1 of 1