This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

Change page at condition on event script
#1
Hi

I have see th epobbility to change the page by custom script

Code:
$(function(){
  if (typeof objectStore !== 'undefined') {
    var id = Scada.encodeGroupAddress('32/1/41');

    objectStore.addListener(id, function(object, type) {
      if (type == 'value') {
        showPlan(55);
      }
    });
  }
});
But if i Need to cahneg page not for all change of 32/1/41 but only if increase is a number , is possible directly custo script or need make a event script , if I use event script , in wich way change page for ES.

BR,
Reply
#2
Hi,

Change showPlan(55) to showPlan(object.value) to select a plan based on the KNX value, then you can put the logic in the controller.

BR,

Erwin
Reply
#3
Hi

OK this if I want to pass the page number to go to, I would be interested since the object is a numerical value so that the change takes place only if the value increases, and not if it decreases but the page is the same. Is it possible to do it in the controller or do I have to lean on a virtual object?

BR,
Reply


Forum Jump: