Problem with system.tag.queryTagHisory

When I run this function the queryTagHistory keeps bringing back an empty list, or at least the rowCount is 0.

	status = system.tag.queryTagHistory(["histprov:scada:/drv:tops scada:default:/tag:" + unit + "/status"], returnSize = 30, aggregationMode = "MinMax", noInterpolation = True, ignoreBadQuality = True)
	ind = system.tag.readBlocking(['[default]' + unit + '/StatusIndicator'])[0]

	ds = []

	i = 0
	for i in range(status.rowCount):
		color = Units.GetColor(status.getValueAt(i, "intvalue"), unit)
		label = GetLabel(ind.value, status.getValueAt(i, "intvalue"))
		data = {"Time": {"style": {"classes": color}, "value": status.getValueAt(i, "timestamp")}
				,"Status": {"style": {"classes": color}, "value": label}}
		ds.append(data)

	caller.props.data = ds

The string for the history should be good, I use a similar one in a graph in the project and it works fine. Any thoughts?Thx, jake

Nm, got it. The function is just looking for the normal tag path, without the [default].

1 Like