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

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

How to query form infotable using query function?

akesana
1-Visitor

How to query form infotable using query function?

Hi,

Could anyone help us to query from info table based on condition?

We found query info table function but need to know query syntax please send us sample syntax

Example:

var params = {

  t: result1 /* INFOTABLE */,

  query: what to write here and how  /* QUERY */

};

// result: INFOTABLE

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

We want to check where condition like where name ='anil' and id=1

Thanks,

Anil Kesana

ACCEPTED SOLUTION

Accepted Solutions
Michail
10-Marble
(To:akesana)

var query =

{

  "filters": {

  "type": "OR",

  "filters": [

  {

  "type": "EQ",

  "fieldName": "Duration",

  "value": "12"

  },

  {

  "type": "EQ",

  "fieldName": "Duration",

  "value": "20"

  }

  ]

  }

};

View solution in original post

4 REPLIES 4
Michail
10-Marble
(To:akesana)

look for "query parameter" in the documentation.

var query =

{

  "filters": {

  "type": "GT, LT, GE, LE, NE, EQ, LIKE, NOTLIKE",

  "fieldName": "Duration",

  "value": "12"

  }

};


var params = {

  t: result1 /* INFOTABLE */,

  query: query  /* QUERY */

};

akesana
1-Visitor
(To:Michail)

Hi Mnudel,

Thanks for your quick response , but I want to check multiple conditions not single value.

Could you explain that ?

var query =

{

  "filters": {

  "type": "EQ",

  "fieldName": "Duration",

  "value": "12" and/or "20"   //like this I want to check will it possible please send syntax for the same

  }

};


var params = {

  t: result1 /* INFOTABLE */,

  query: query  /* QUERY */

};

Thanks

Anil Kesana

Michail
10-Marble
(To:akesana)

var query =

{

  "filters": {

  "type": "OR",

  "filters": [

  {

  "type": "EQ",

  "fieldName": "Duration",

  "value": "12"

  },

  {

  "type": "EQ",

  "fieldName": "Duration",

  "value": "20"

  }

  ]

  }

};

akesana
1-Visitor
(To:Michail)

Thank you so much Mundel got it

Thanks,

Anil Kesana

Announcements


Top Tags