Skip to main content

SearchCondition

A structure that specifies a single search condition.

NameDescriptionType
expressionThe left side of the condition (e.g. "Author" or "Project.Customer").Expression
typeThe type of the condition (e.g. "equals").ConditionType
valueThe right side of the condition (= the desired value) (e.g. "SalJus").TypedValue

Helper Methods and Properties

⚠️ Note

These helper methods and properties are available when using the npm package @m-filescorporation/uix-vault-messages. Install it in your project to use these helpers. For more information, see Overview/VaultMessages/.

Factory Methods

MethodDescriptionParametersReturns
TextCreates a search condition to search for text.options: FTSFLAGS
condition: ConditionType
value: string
SearchCondition
StatusCreates a search condition to search for status.type: StatusType
condition: ConditionType
dataType: Datatype
value: TypedValueValueMap[T]
SearchCondition
StatusWithTypedValueCreates a search condition to search for status.type: StatusType
condition: ConditionType
value: TypedValue
SearchCondition
PropertyCreates a search condition to search for a property.propertyDef: number
condition: ConditionType
dataType: Datatype
value: TypedValueValueMap[T]
SearchCondition
PropertyWithTypedValueCreates a search condition to search for a property.propertyDef: number
condition: ConditionType
value: TypedValue
SearchCondition
AnyLookupPropertyCreates a search condition to search for an any lookup property.valueList: number
condition: ConditionType
value: Lookup | number | Array<Lookup | number>
SearchCondition

Creating Objects

// Creates a search condition to search for text.
const result = SearchCondition.Text({}, 0, "example string");

// Creates a search condition to search for status.
const result = SearchCondition.Status(0, 0, 0);

// Creates a search condition to search for status.
const result = SearchCondition.StatusWithTypedValue(
0,
0,
TypedValue.Text("example text"),
);

// Creates a search condition to search for a property.
const result = SearchCondition.Property(0, 0, 0);

// Creates a search condition to search for a property.
const result = SearchCondition.PropertyWithTypedValue(
0,
0,
TypedValue.Text("example text"),
);

// Creates a search condition to search for an any lookup property.
const result = SearchCondition.AnyLookupProperty(0, 0, new Lookup());

Example

{
"expression": {
"type": 7 /* Enum: ExpressionType */,
"data": {
"permissions": {
"type": 6 /* Enum: PermissionsExpressionType */
}
},
"indirection_levels": [] /* Array of IndirectionLevel */
},
"type": 20 /* Enum: ConditionType */,
"value": {
"is_null_value": false,
"type": 15 /* Enum: Datatype */,
"data": {
"acl": {
"checked_out_to_user": 0,
"is_fully_authoritative": false,
"custom_component": {
"named_acl_id": 0,
"has_named_acl": false,
"current_user_id": 0,
"has_current_user": false,
"permissions": [] /* Array of AccessControlEntry */,
"overridability_permissions": [] /* Array of AccessControlEntry */,
"status": {
"all": false,
"deleted": false,
"source_item_linked_via_pseudo_users": false
}
},
"restrictive_components": [] /* Array of AccessControlListComponentMapEntry */,
"secondary_access_control_list": {} /* AccessControlList */,
"additive_components": [] /* Array of AccessControlListComponentMapEntry */
}
}
}
}