I have a problem with the scripting function in the object. I use it to retrieve a bunch of historical tags from a database, firing it from a calendar component, once a date has been selected.
Here is the function call I make with the properties I pass in:
dataSet= system.tag.queryTagHistory(paths=paths_to_query, startDate=event.source.date, endDate=event.source.date, returnSize=1, aggregationMode=“lastValue”, returnFormat=‘Wide’, ignoreBadQuality =‘false’)
paths_to_query is the array of tag paths of the tags I want to retrieve
startDate and endDate are the same, in particular the one selected in the calendar object
I show the dataset retrieved in a table.
When I query the db selecting a date for which I am sure data have been stored, everything works fine:
when I select a date for which there are no data stored or the gateway was not active, I get some values I don’t understand and a red overlay appears over the table’s fields:
The table’s quality property doesn’t change.
In this way, I can’t detect either the query runs fine or not.