How to customization advanced query
Similar to the windchill
Based on the advanced query function of attribute selection
Similar to the windchill
Based on the advanced query function of attribute selection
Hi Mr. Liang,
Here is my sample code:
var query1 =
{
"filters": {
"type": "GT",
"fieldName": "num",
"value": "12"}
};
var values = me.CreateValues();
values.num = num; //NUMBER
values.name = name; //STRING [Primary Key]
var params = {
maxItems: 500 /* NUMBER */,
values: values /* INFOTABLE*/,
query: query1 /* QUERY */,
source: undefined /* STRING */,
tags: undefined /* TAGS */
};
var result = me.QueryDataTableEntries(params);
For detail query infomation, please check here PTC.
And the values is what exectly you want to filter your datatable.


If you are using a InfoTable, and cannot use API QueryDataTableEntities, please follow below code:
var params = {
maxItems: 500 /* NUMBER */
};
var myInfo = me.GetDataTableEntries(params);
var query1 =
{
"filters": {
"type": "and",
"filters":[
{
"type":"EQ",
"fieldName":"num",
"value":num
},
{
"type":"EQ",
"fieldName":"name",
"value":name
}
]
}
};
var params = {
t: myInfo /* INFOTABLE */,
query: query1 /* QUERY */
};
// result: INFOTABLE
var result = Resources["InfoTableFunctions"].Query(params);
And the binding is like below screenshot:


Lily
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.