I want search all records with not matching two keyword (CLOS & CANS) like:
1. ADVG XCLT QRPR
2. ADVG CLOS QRPR
3. ADVG CLOS CANS
4. ADVG PQRS QRPR
from the 4 rows I want to display first and last rows. Rows having two word like CLOS and CANS shall not be display.
So, I want to know which keyword I shall use in query function. Not Includes function work only on keyword. But this query have more than one keyword. Please advice.
Discussion posts and replies are publicly visible
You can try 'not includes' parameter. See the sample code for reference:
filters: a!queryLogicalExpression( operator: "AND", filters: { a!queryFilter( field: 'recordType!xxx.fields.abc', operator: "not includes", value: "CLOS" ), a!queryFilter( field: 'recordType!xxx.fields.abc', operator: "not includes", value: "CANS" ) }, ignoreFiltersWithEmptyValues: true )
Thanks for your reply. but I want to call like this with single value selection from dropdown like:
filters: a!queryLogicalExpression( operator: "AND", filters: { a!queryFilter( field: 'recordType!xxx.fields.abc', operator: "not includes", value:{ "CLOS", "CANS"} ),}, ignoreFiltersWithEmptyValues: true )
So I want to know if it is possible or not or which operation I have to use.
a!queryFilter( field: 'recordType!XYZ.fields.abc', operator: "not includes", value: "Selected Value" )
Did you try a forEach?
filters: a!queryLogicalExpression( operator: "AND", filters: { a!forEach( items: {"CLOS, "CANS"}, expression: a!queryFilter( field: 'recordType!xxx.fields.abc', operator: "not includes", value: fv!item ) ) } }
Thanks Mathieu.. It is working.