Skip to main content
1-Visitor
January 12, 2018
Question

Querying Infotable?

Hi,

I am trying to create some custom queries in order to display results of the thing's properties. I am following the format mentioned in another thread here as How to query form infotable using query function?

Like that thread I also want to execute similar sort of thing where Speed >'20' and id=1.

However, when executing the service, I get the error as Wrapped java.lang.NullPointerException Cause: null.

    var query = {

    "filters": {

    "type": "AND",

    "filters": [

          {

        "fieldName": "Speed",

        "type": "GT",

        "value": "20"

      },

      {

        "fieldName": "ID",

        "type": "EQ",

        "value": "1"

      }

    ]

  }

};

var params = {

t: result /* INFOTABLE */,

query: query

};

var result = Resources["InfoTableFunctions"].Query(params);


Please do let me know what may have been the error in the code/process and what could be the possible solution?

Thanks!

P.S. I am keeping the output of the service as InfoTable





15 replies

1-Visitor
January 12, 2018

For id=1 it's "EQ" condition not "LT"

Translate
tyadav1-VisitorAuthor
1-Visitor
January 12, 2018

Hi,

That was a typo here in the question (I corrected it now). I corrected it and tried it but the same error is displayed again.

Translate
1-Visitor
January 12, 2018

I'm not sure if that's the reason, but try values without " as it are Number/Integer values

Translate