Adding filters to the Datashape Query, how should it be done ?
As of now I am using following code..
var queryToAvoidPowderMixTables = {
"filters":{
"type": "NE",
"fieldName": "Source",
"value": "Powder_Mix"
}
};
var params = {
filter: filter,
dataShapeName: "PTC.SCA.SCO.MaterialDefinition",
offset: offset,
limit: limit,
query: queryToAvoidPowderMixTables
};
var MaterialDefinitions = Things["PTC.SCA.SCO.PostgresDatabase"].Query(params);
MaterialDefinitions.Sort({ name: "UID", ascending: false });
but the query for "Power_Mix" is not working..
Thanks,
Shashi.
Solved! Go to Solution.
It looks like you might need to form your JSON a bit differently. See here:
Hope that helps,
Nick
It looks like you might need to form your JSON a bit differently. See here:
Hope that helps,
Nick