Search Filters

Applies to QAComplete 12.71 SaaS, last modified on January 18, 2021

QAComplete API supports filter expressions, which can be used to sort the response data in a necessary way. This can be useful when you need to process a big amount of similar items.

The operations that can work with filter expressions are listed below:

Every item object has multiple fields which describe its attributes. QAComplete supports 4 types of fields: numeric, string, boolean, and date.

You can use both simple and complex conditions in your filter expression. Every condition covers only one QAComplete entity. It is obligatory that the field names you specify in the condition belong to this entity.

To create the simple condition, use the following syntax:

[FieldName][Operation][Value]

For example:

FolderId is not empty

In this example, the FieldName is FolderId, the Operation is is not, and Value is empty.

For the full list of possible operations for various types of fields, see below.

To create a complex condition, put multiple simple conditions into brackets and connect them with logical operators: AND, OR, or NOT. For example:

(UserId = 1254) OR (SecurityGroup is not 'Security Admin') AND (SpouseName != 'Mary')
Note: The filter string must be URL-encoded. Spaces are encoded as %20, apostrophes as %27, and so on. For example:
Title ~ 'abc'
becomes:
Title%20~%20%27abc%27
Many programming languages provide a method to encode strings this way.

Operations for filter expressions

Filters for numeric fields
Operation Description Possible value Example
= is equal
  • numeric constant
  • other numeric field
AssigneeUserId = 1486
!= is not equal AssigneeUserId != 1486
> is greater NbrFiles > 2
< is less NbrFiles > 5
>= is greater or equal NbrNote >= 3
<= is less or equal NbrNote <= 1
in is one of array of numeric constants FolderId in {329423,234435,21894}
not in is not one of FolderId not in {329423,234435,21894}
is check for specific value 'empty' FolderId is empty
is not FolderId is not empty
Filters for string fields
Operation Description Possible value Example
= is equal
  • string constant
  • other string field
Title = 'My issue'
!= is not equal Status != 'Active'
~ is like pattern Description ~ 'Amanda'
!~ is not like Description !~ 'Orlando'
in is one of array of string constants Status in {'Closed','Resolved'}
not in is not one of Status not in {'Closed','Resolved'}
is check for specific value 'empty' Description is empty
is not Description is not empty
Filters for boolean fields
Operation Description Possible value Example
= is equal 'true' or 'false' IsActive = true
!= is not equal IsActive != true
Filters for date fields
Operation Description Possible value Example
= is equal
  • date constant
  • datetime constant
  • other date field
DateCreated = '2015-05-12'
!= is not equal DateCreated != '2015-05-12'
> is greater DateCreated > '2015-05-12'
< is less DateCreated < '2015-05-12'
>= is greater or equal DateCreated >= '2015-05-12'
<= is less or equal DateCreated <= '2015-05-12'
in is one of array of date constants DateCreated in {'2015-05-12','2015-06-12','2015-07-12','2015-08-12'}
not in is not one of DateCreated not in {'2015-05-12','2015-06-12','2015-07-12','2015-08-12'}
is check for specific value 'empty' DateClosed is empty
is not DateClosed is not empty

Note: You can use predefined constants as possible values to work with Date fields:

  • TODAY – The current date
  • NOW – The current date and the current time

See Also

QAComplete REST API Reference

Highlight search results