Searching from Database with not matching two word

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

Parents
  • 0
    Certified Associate Developer

    a!queryRecordType(
    recordType: recordType!abc,
    filters: {
    a!queryFilter(
    field: recordType!abc.xyz,
    operator: "not includes",
    value: "CLOS"
    ),
    a!queryFilter(
    field: recordType!abc.xyz,
    operator: "not includes",
    value: "CONS"
    )
    },
    pagingInfo: a!pagingInfo(startIndex: 1, batchSize: 500)
    )

    -------------------------------------------------------------------------------------
    a!queryRecordType(
    recordType: recordType!abc,
    filters: a!queryLogicalExpression(
    operator: "AND",
    filters: {
    a!queryFilter(
    field: recordType!abc.xyz,
    operator: "not includes",
    value: "CLOS"
    ),
    a!queryFilter(
    field: recordType!abc.xyz,
    operator: "not includes",
    value: "CONS"
    )
    }
    ),
    pagingInfo: a!pagingInfo(startIndex: 1, batchSize: 500)
    )

Reply
  • 0
    Certified Associate Developer

    a!queryRecordType(
    recordType: recordType!abc,
    filters: {
    a!queryFilter(
    field: recordType!abc.xyz,
    operator: "not includes",
    value: "CLOS"
    ),
    a!queryFilter(
    field: recordType!abc.xyz,
    operator: "not includes",
    value: "CONS"
    )
    },
    pagingInfo: a!pagingInfo(startIndex: 1, batchSize: 500)
    )

    -------------------------------------------------------------------------------------
    a!queryRecordType(
    recordType: recordType!abc,
    filters: a!queryLogicalExpression(
    operator: "AND",
    filters: {
    a!queryFilter(
    field: recordType!abc.xyz,
    operator: "not includes",
    value: "CLOS"
    ),
    a!queryFilter(
    field: recordType!abc.xyz,
    operator: "not includes",
    value: "CONS"
    )
    }
    ),
    pagingInfo: a!pagingInfo(startIndex: 1, batchSize: 500)
    )

Children