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

JavaScript syntaxes for EXTERNAL DATA

Highlighted
Level 8

JavaScript syntaxes for EXTERNAL DATA

Hello everyone (again Smiley Happy)

 

I started working with EXTERNAL DATA and I would like to know some JavaScript syntaxes:

  • How to get EXTERNAL DATA Parameter value from javascript?
  • How to run EXTERNAL DATA Service from javascript?
  • How to get EXTERNAL DATA Event value from javascript?

Screen_390.png

 

Thanks for every answer.

 

Tomas

2 REPLIES

Re: JavaScript syntaxes for EXTERNAL DATA

Hi Tomas, 

 

I am not sure, if I got your questions right, but here is what I know:

 

You can bind external parameter via drag'n drop on an application parameter. Now you can use the following code to watch the app- / external parameter:

$scope.$watch("app.params['oventemperature']", function() {

if (oventemperature>=180)

{

console.log("Oven is ready, the temperature is at: "+oventemperature);

}

Re: JavaScript syntaxes for EXTERNAL DATA

Hello whity,

 

Thanks for your answer.

 

I suspect, your example is more complicated.
I am looking for syntax which enable me to set input parameter of a service (from External data - for example maxItems property from QueryPropertyHistory) directly from javascript code.

 

I hope this is more understandable (I'm not so skilled in English Smiley Happy).

 

Tomas