Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X
I get the following error when invoking a simple query on a value stream (using the DataFilter and TimeSelectors in the mashup).
[context: com.thingworx.webservices.context.HttpExecutionContext@71e1b30c][message: Unable to Invoke Service QueryPropertyHistory on N4A_Thing : null]
Is this because the field I am querying has null values? The query is simply gps_status equals to 1. There are lots of entries where this exists, but all I get is the error.
If I am not allowed to have null entries in the ValueStream, then how do I avoid this? I need to filter out invalid location data when the GPS status is not valid.
Solved! Go to Solution.
Unfortunately, null in this case is probably the text description of the exception being thrown and not a reference to the values in your value stream. Could you try to make this call within a service to eliminate the possibility of a problem with your mashup bindings?
Unfortunately, null in this case is probably the text description of the exception being thrown and not a reference to the values in your value stream. Could you try to make this call within a service to eliminate the possibility of a problem with your mashup bindings?
Bill,
Thanks for the response.
I try to test the query using a the built in QueryPropertyHistory, but get an error on my query syntax. What is the correct syntax to perform the SELECT * WHERE gps_status = 1....This SQL type query gives an error about not following JSON query. I am not familiar with, or can I find reference to JSON query....
Invalid QUERY value. Please make sure it's a valid JSON string
Thanks for the help!
Rob
What is your actual query ?
Based on the DOC 6.5 (http://support.ptc.com/cs/help/thingworx_hc/thingworx_6.5_hc/index.jspx?id=QueryParameterforQueryServices&action=show):
var query =
{
filters:
{
type: "EQ",
fieldName: "gps_status",
value: "1"
}
};