Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X
Hi All,
I am trying to add alert to the property with a service.
Got an error like Error executing service test. Message :: Alert Type [Above] is not valid - See Script Error Log for more details. How to resolve this issue?
I followed same code mentioned here.
// Create the Attributes Infotable for AddOrUpdateAlert call var params = { infoTableName: "alertAttr" /* STRING */ }; var attrs = Resources["InfoTableFunctions"].CreateInfoTable(params); // Define the fields required by an Above type Alert for an INTEGER field (not the values!) // limit - Minimum value at which the alert will trigger. var field = new Object(); field.name = "limit"; field.baseType = 'INTEGER'; attrs.AddField(field); // limitInclusive - Is the condition Greater than (>) or Greater than or equal (>=)? field.name = "limitInclusive"; field.baseType = 'BOOLEAN'; attrs.AddField(field); // Define the new Alert values and add the row to the table. var row = new Object(); row.limit = 5; // Alert will trigger when field >=5 row.limitInclusive = true; // Alert includes 5 attrs.AddRow(row); // Call the AddOrUpdateAlert Service var params = { alertType: "Above" /* STRING */, alertName: "MyAlert" /* STRING */, property: "MyIntProperty" /* STRING */, attributes: attrs /* INFOTABLE */, priority: 1 /* INTEGER */, persistent: true /* BOOLEAN */, enabled: true /* BOOLEAN */ }; me.AddOrUpdateAlert(params);
Hello.
The code you pasted in is indeed the same as the example in the Help Center; what does the Script Error Log referenced by the error message say?
Thanks,
-- Craig A.
Yes. I am replicating the same scenario. i am getting an error, Error executing service test. Message :: Alert Type [Above] is not valid - See Script Error Log for more details.
Hello all,
We are also facing same issue in Thingworx 8.3.0 which is working fine in Thingworx 8.2
Regards,
VR
Hi, all.
Is there anything in the Script Error Log that indicates what the problem might be?
Thanks,
-- Craig A.
Hi
May Be "MyIntProperty" on your thing either String or some other Base type