Skip to main content
1-Visitor
November 9, 2018
Question

Pop up notification when data is changing

  • November 9, 2018
  • 1 reply
  • 1286 views

Hi,

can someone please provide me some pointers/hints on how to achieve the following: 

 

I get data about mistakes, which happen on a specific machine in the production through the composer to my thingworx studio. (sql- database) I can show theses mistakes by using a toggle button. Then a table with all mistakes of the last hour will be visible. 

 

What I want to achieve now is:

 

A pop-up notification in the App on the device of the worker, which is always triggered, whenever a new mistake happens. So the worker can react immediately.

 

In my understanding, I need a pop-up which is triggered by an event. And this event is the datachange of the specific "mistake"-service. 

 

But how do I do this? Is a js script? How am I then connecting it to this service as it should be triggered automatically?

 

Thanks all!

1 reply

21-Topaz I
November 9, 2018

You will need to bind the service property to an application parameter. You can then utilize the $watch() function to invoke the popup when the data changes. For your popup, you can use $ionicPopup. Information on this can be found here: https://ionicframework.com/docs/v1/api/service/$ionicPopup/