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

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

Query ValueStream with null entries

rwondoloski
1-Visitor

Query ValueStream with null entries

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.

ACCEPTED SOLUTION

Accepted Solutions

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?

View solution in original post

3 REPLIES 3

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

qn
12-Amethyst
12-Amethyst
(To:rwondoloski)

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"

     }

};

Announcements


Top Tags