Javascript queries
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
Solved! Go to Solution.
- Labels:
-
Best Practices
-
Coding
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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 */ });
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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 */ });
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you
