Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X
Hi,
I am using the following snippet, to Query on FieldName Which does not contain the "Test Question" Text in the FieldName Data
var query = {
"filters":{
"type": "NOTLIKE",
"fieldName": "Name",
"value": "Test question:\\+*"
}
};
let params = {
t: result /* INFOTABLE */,
query: query /* QUERY */
};
// result: INFOTABLE
result = Resources["InfoTableFunctions"].Query(params);
Even though I get an INFOTABLE with rows containing "Test Question" in the FieldName "Name"..
Where did I do wrong?
Note: I have followed Query Parameter for Query Services (ptc.com) and Picked up the snippet from there
Thanks,
Solved! Go to Solution.
Try value as below,
var query = {
"filters":{
"type": "NOTLIKE",
"fieldName": "Name",
"value": "Test question*"
}
};
Try value as below,
var query = {
"filters":{
"type": "NOTLIKE",
"fieldName": "Name",
"value": "Test question*"
}
};
Hi @Sathishkumar_C,
Thanks for the Quick response, but it is not working...
Thanks,
Below code is working fine for me, I don't the list of values starting with "Audit"... and ensure the field name once..
let params = {
maxItems: undefined /* NUMBER */,
nameMask: undefined /* STRING */,
type: "Thing" /* STRING */,
tags: undefined /* TAGS */
};
let entities = Resources["EntityServices"].GetEntityList(params);// result: INFOTABLE dataShape: RootEntityList
var query = {
"filters":{
"type": "NOTLIKE",
"fieldName": "name",
"value": "Audit*"
}
};
let params1 = {
t: entities /* INFOTABLE */,
query: query /* QUERY */
};
result = Resources["InfoTableFunctions"].Query(params1);// result: INFOTABLE
,
Always starts from the beginning, first I would check whether the "fieldName": "Name" really exists in the table. Pay attention to upper and lower case. If there is no name as a column, this is not taken into account here either.
Next I would test "value": "%Test question%" .
And if what you expect doesn't come out here, give a brobe with LIKE and see what comes as an answer now.