cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

With QueryDataTableEntries service to compare between dates

SaranKarthick
16-Pearl

With QueryDataTableEntries service to compare between dates

Hi,

I'm working on a service which gets two dates as input(Start and End dates) and returns the entries for which the dates in a particular column lies within the input range as an infotable.

I have used a query with the "BETWEEN" type filter.

The code i used is:

var query = {

  "filters": {

    "fieldName": "LoanStartDate",

    "type": "BETWEEN",

    "from": 1483122600000,

    "to": 1517337000000

  }

};

var params = {

  maxItems: undefined /* NUMBER */,

  values: ApprovedLoanableAssets /* INFOTABLE*/,

  query: query /* QUERY */,

  source: me.name /* STRING */,

  tags: "Keysight-Customer:"+CustomerID /* TAGS */

};

//result: INFOTABLE

var result = Things[CustomerID+"-LoanPoolAssetDetailDT"].QueryDataTableEntries(params);

The output is:

The output is without any entries.Yes, i have checked if there are no entries to be shown, but i'm sure that it consists of atleast one entry which coincides with the query. Can you point where i went wrong. Thanks in advance.

2 REPLIES 2

You had filled a lot of parameters, you are 100% sure that the other parameters are ok? I mean:

  • values: ApprovedLoanableAssets --> Which it's the content of this object?
  • source: me.name --> You are sure the DataTable Entries has source filled
  • tags: "Keysight..." --> You are sure entries are correctly tagged?

What I would do it's query for one condition ( source, or tags, or values ) and keep adding the others until you don't get anything.

Sorry for the late reply. The source parameter was wrong. Now its working fine. Thanks for ur suggestion.

Top Tags