SearchCondition

View as Markdown

A structure that specifies a single search condition.

A condition compares the value of expression, evaluated for each object, with value using the operator type. Common conditions:

To find objects... expression type value
that are not deleted status value STATUS_TYPE_IS_DELETED CONDITION_TYPE_EQUAL Boolean false
of an object type status value STATUS_TYPE_OBJECT_TYPE CONDITION_TYPE_EQUAL lookup, value list -11, item = object type ID
of a class property value, property_def 100 CONDITION_TYPE_EQUAL lookup, value list 1, item = class ID
of any of several classes property value, property_def 100 CONDITION_TYPE_EQUAL multi-select lookup of the class IDs
with an object ID status value STATUS_TYPE_OBJECT_ID CONDITION_TYPE_EQUAL integer
whose title contains a text property value, property_def 0 CONDITION_TYPE_CONTAINS text
that refer to a lookup item property value of the lookup property CONDITION_TYPE_EQUAL lookup of the item
whose property is empty property value CONDITION_TYPE_EQUAL the property's data type, is_null_value true
modified in the last 7 days property value 21 with DATA_FUNCTION_DAYS_FROM CONDITION_TYPE_LESS_THAN_OR_EQUAL integer 7
matching a full-text search any field, search_metadata and/or search_filedata set CONDITION_TYPE_CONTAINS text
with a file name pattern file value FILE_VALUE_TYPE_FILE_NAME CONDITION_TYPE_MATCHES_WILDCARD_PATTERN text such as *.pdf

Property and value list IDs other than the built-in ones (0 Name or title, 20 Created, 21 Last modified, 100 Class; value list 1 for classes, -11 for object types) differ between vaults: resolve them by alias or GUID first. A condition the server cannot evaluate fails with "Invalid search condition."

Full nameMFiles.SearchCondition
Proto filemfiles/structs.proto

Fields

FieldTypeNumberDescription
expressionExpression1The left side of the condition: what is evaluated for each object, such as a property value, a status value or any field (full-text search).
typeConditionType2The comparison operator.
valueTypedValue3The right side of the condition: the value to compare with. Its data type must suit the expression, for example a lookup for a lookup property, Boolean for STATUS_TYPE_IS_DELETED.

Used by methods

Used in fields