Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X
I am running the following code in the Expression, but there is no output from the Expression. Does QueryNamedPropertyHistory work in Expression?
DataTable = Things["ThingName"].QueryNamedPropertyHistory({
propertyNames: {
"rows": [{
"name": "PropertyName"
}],
"dataShape": {
"fieldDefinitions": {
"name": {
"name": "name",
"aspects": {},
"description": "",
"baseType": "STRING",
"ordinal": 1
},
"description": {
"name": "description",
"aspects": {},
"description": "",
"baseType": "STRING",
"ordinal": 2
}
}
}
} /* INFOTABLE */ ,
maxItems: undefined /* NUMBER */ ,
query: undefined /* QUERY */ ,
maxDataItems: 500000 /* NUMBER */ ,
startDate: startDate /* DATETIME */ ,
endDate: endDate /* DATETIME */ ,
oldestFirst: true /* BOOLEAN */ ,
dataQuery: undefined /* QUERY */
});
if(DataTable.rows.length === 0)
{
Output = "No Data";
}
else{
Output = " ";
}
Thanks,
Shashi.
Solved! Go to Solution.
I don't think the QueryNamedPropertyHistory service will run in the expression function. You can get the length of infotable returned by QueryNamedPropertyHistory in a separate service and pass its output to the expression function. Refer this article explaining all the tasks that can be performed with Expression.
I don't think the QueryNamedPropertyHistory service will run in the expression function. You can get the length of infotable returned by QueryNamedPropertyHistory in a separate service and pass its output to the expression function. Refer this article explaining all the tasks that can be performed with Expression.