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

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

data change event in service

svisveswaraiya
17-Peridot

data change event in service

Hi,

 

I have written a service (Java script)  in which based on the input the output changes. When I bind this result to the workspace, I want to trigger this service only based on data change event of a kepware value. I do not want to trigger any other event in the workspace. In background I want to trigger this service whenever there is data change in a tag in Kepware. 

 

Below is the service I have written.

if ('Skid Number' == 'Skid Number')
{
result = Things["Navistar_Shipping_kepware_thing"].Tracking_Data_NAVISTAR_PLC_LINE_32_PRB407 ;


}

if (ToggleInput == 'Skid Type')
{
// result: INFOTABLE dataShape: "testSqlDS"
var result1 = me.Get_SkidType({
skidNumber_SkidType: Things["Navistar_Shipping_kepware_thing"].Tracking_Data_NAVISTAR_PLC_LINE_32_PRB407
});

result = result1.skid_type_S;

}
if (ToggleInput == 'Line Set Number')
{
// result: INFOTABLE dataShape: "testDataShap"
var result2 = me.Get_LineSetNumber({
skidNumber: Things["Navistar_Shipping_kepware_thing"].Tracking_Data_NAVISTAR_PLC_LINE_32_PRB407 /* INTEGER */
});
result = result2.line_set_number_S;

}

 

Please provide some help.

 

Thanks,

Shalini V.

0 REPLIES 0
Top Tags