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

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

How to query form infotable using query function?

akesana
1-Newbie

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
9-Granite
(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
9-Granite
(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 */

};

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
9-Granite
(To:akesana)

var query =

{

  "filters": {

  "type": "OR",

  "filters": [

  {

  "type": "EQ",

  "fieldName": "Duration",

  "value": "12"

  },

  {

  "type": "EQ",

  "fieldName": "Duration",

  "value": "20"

  }

  ]

  }

};

Thank you so much Mundel got it

Thanks,

Anil Kesana

Announcements


Top Tags