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

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

Javascript queries

i_abidi
7-Bedrock

Javascript queries

Hello Community,

I just started working on a project to optimize data updates so we started caching data from the server to thingworx itself but i do not manipulate as good javascript queries. I wanted to write a javascript service to query certain rows with partial information and i do not know what should i write in the filter to do so, to explain my problem more, let's suppose we have a row in the cached data table named Machine, the field machine has 3 base components A, b and C and i wanted the row having C= something. Can anyone help me with this, thank you so much.

1 ACCEPTED SOLUTION

Accepted Solutions
supandey
19-Tanzanite
(To:i_abidi)

Hi @i_abidi i think this should help Query Parameter for Query Services.

 

Depending on what sort of entity you are working with to hold the cache in ThingWorx, you can use the Query in your query service. Below e.g. is from the DataTable having QueryDataTableEntries

 

// result: INFOTABLE dataShape: ""
var result =  me.QueryDataTableEntries({
	maxItems: undefined /* NUMBER */,
	values: undefined /* INFOTABLE */,
	query: undefined /* QUERY */,
	source: undefined /* STRING */,
	tags: undefined /* TAGS */
});

View solution in original post

2 REPLIES 2
supandey
19-Tanzanite
(To:i_abidi)

Hi @i_abidi i think this should help Query Parameter for Query Services.

 

Depending on what sort of entity you are working with to hold the cache in ThingWorx, you can use the Query in your query service. Below e.g. is from the DataTable having QueryDataTableEntries

 

// result: INFOTABLE dataShape: ""
var result =  me.QueryDataTableEntries({
	maxItems: undefined /* NUMBER */,
	values: undefined /* INFOTABLE */,
	query: undefined /* QUERY */,
	source: undefined /* STRING */,
	tags: undefined /* TAGS */
});

Thank you

Top Tags