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

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

'IN' query of Datatable not working

ague
12-Amethyst

'IN' query of Datatable not working

I'm querying a datatable, and passing this query (below). If I run the QueryDataTable entries with this query, it returns no results. If I just change the Station parameter to be "EQ" and just add the machine name as a string, the query works as expected (returning 40+ results). 

 

What gives? What am I doing wrong?

 

 

 

 

 

var machineArray = ['my_machine_name'];

 

var query = {
"filters": {
"type": "And",
"filters": [
{
"type": "IN",
"fieldName": "Station",
"value": machineArray
},
{
"type": "EQ",
"fieldName": "Program",
"value": Transmission
},
{
"type": "EQ",
"fieldName": "Operation",
"value": Operation
}]}};

 

var myQueryResults = Things["Ford.PFS.GM.Historian.Repository"].QueryDataTableEntries({
maxItems: 200000 /* NUMBER */,
values: undefined /* INFOTABLE */,
query: query /* QUERY */,
source: undefined /* STRING */,
tags: undefined /* TAGS */
});

1 ACCEPTED SOLUTION

Accepted Solutions
PaiChung
22-Sapphire I
(To:ague)

Perhaps you'll need to enter a support ticket, syntax looks fine.

View solution in original post

2 REPLIES 2
PaiChung
22-Sapphire I
(To:ague)

Perhaps you'll need to enter a support ticket, syntax looks fine.

ague
12-Amethyst
(To:PaiChung)

Thank you - I just opened a ticket. 

Top Tags