cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

how to write service for alert window ?

Highlighted
Newbie

how to write service for alert window ?

i need small alert window(popup box)  whenever  the  some property value exceeded threshold level

8 REPLIES 8
Highlighted

Re: how to write service for alert window ?

Hello Dinesh,

You can use validator to check if property value exceeds threshold value and depending on validator output(true or false) you can use status message to show alert window.

Highlighted

Re: how to write service for alert window ?

hello gautham vejandla,

               this is correct way  to validate the property value

if(me.temp>50)

{

    me.visible=true;

}

the above code write in service.what can i do next...

Highlighted

Re: how to write service for alert window ?

I am not sure if I understood correctly, you wrote a service which returns 'true' as output when a property value exceeds certain level?

if that is the case, then you can bind the output of this service with 'visible' property of 'status message' widget and write your alert message in 'message' field.

Highlighted

Re: how to write service for alert window ?

can u post the Alert code.i am new on thingworx

Highlighted

Re: how to write service for alert window ?

can u post the Alert code.i am new on thingworx

Highlighted

Re: how to write service for alert window ?

you can write the service which you have written above.

if(me.temp>50)

{

    me.visible=true;

    result=true;}

else{

me.visible=false;

result = false;}

The return type of the above service should be boolean.

Then, now take an validator widget and pass the output of the above service to the input of the validator added. This should be invisible.

Now, in the evaluate section of the widget properties write:

if (result=true){output=true}else{output=false;} and set true to checkbox of the output property.

and click on message property and type the message which you want if output is true and also for if output is false.


and bind with text box or any label widget etc.



Highlighted

Re: how to write service for alert window ?

this is work, but i need pop up alert in mashup i mean suppose if temp is very high display the pop up alert..How can u tell me

Re: how to write service for alert window ?

it is work?i do just like Aditya say, but i take an validator widget and pass the output of the service to the input of the validator's visible,i not sure it is right.    can you show  me more about what you do for making it work??   thanks a lot!!!!

Announcements

Thingworx Navigate content has a new home! Click here to access the new Thingworx Navigate forum! ______________________________