No rows when querying tags history


I’m trying to query tags history within a module. I’m doing this by extending class com.inductiveautomation.ignition.client.script.ClientTagUtilities. I’m invoking protected method queryTagHistoryImpl method. Problem? Not getting data. Please let me know what I’m doing wrong:

ClientTagUtilities’s method definition is

Dataset com.inductiveautomation.ignition.client.script.ClientTagUtilities.queryTagHistoryImpl
(List paths,
Date startDate,
Date endDate,
int returnSize,
AggregationMode aggregationMode,
ReturnFormat format,
List aliases

  1. In paths variable I send a list containing just one TagPath, which I send as a BasicTagPath. I instantiate BasicTagPath by sending the datasource name to constructor. Then I append to it the string with the tag name, like this

    BasicTagPath path = new BasicTagPath(getDatasource());
    path.append(path, tagPath); // I’ve tried also sending null in first parameter, same result.
    // tagPath example = “line01/plc/good”

then I add this BasicTagPath instance to the list I send to the method as first parameter

  1. in ReturnSize I’ve tried -1 and 0 with no luck
  2. in aggregationMode I’ve tried Average, LastValue with no luck either
  3. in ReturnFormat I’ve tried Wide and Tall
  4. in aliases I send null
  5. In startDate and EndDate I send a range where I know there’s information stored in database for the tag.

Any help would be highly appreciated

Thanks in advance