Tag History Binding doesn't match system.tag.queryTagHistory

I'm writing a script using the system.tag.queryTagHistory function that replicates the Tag History binding.

However, the returned values don't match. the system.tag.queryTagHistory is providing 300+ rows than the Tag History Binding, even though they have the same tag path and timeframe.

I could use some help on this to make sure that they'll match. Below are some pictures to illustrate my problem. Thank you in advance!

image

It looks like your one query is returning results without interpolation and the other is returning with an aggregate. I only glanced at this so I might have missed something.

search the documentation link for "Raw Data Queries"

Documentation
https://docs.inductiveautomation.com/display/DOC81/Configuring+Tag+History

1 Like

I added the returnSize and removed the interpolation, but it still didn't work.

I found the problem. It was on my time range.

1 Like

Excellent. I was going to suggest that and I was going to look it over a little more thoroughly.

Glad you got it.

1 Like