Skip to main content

Expression

Expression that can be evaluated for any object.

NameDescriptionType
typeThe type of the expression (e.g. property value or status value).ExpressionType
dataThe expression data, optionally including indirection levels. Indirection levels allow the expression to traverse linked objects — for example, evaluating "Project.Customer.Country" follows the Project property, then the Customer property, and finally evaluates Country. The indirection levels (e.g., "Project.Customer") are stored as an array of PropertyDefOrObjectType structs, and the final segment is specified as the expression itself.ExpressionUnion
indirection_levelsThe indirection levels.IndirectionLevel[]

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 Vault API Helpers.

Factory Methods

MethodDescriptionParametersReturns
TextCreates a new Text expression.options: FTSFLAGSExpression
StatusCreates a new Status expression.type: StatusTypeExpression
PropertyCreates a new Property expression for the specified property definition ID.propertyDef: numberExpression
AnyLookupPropertyCreates a new AnyLookupProperty expression for the specified value list.valueList: numberExpression

Creating Objects

// Creates a new Text expression.
const result = Expression.Text({});

// Creates a new Status expression.
const result = Expression.Status(0);

// Creates a new Property expression for the specified property definition ID.
const result = Expression.Property(0);

// Creates a new AnyLookupProperty expression for the specified value list.
const result = Expression.AnyLookupProperty(0);

Example

{
"type": 7 /* Enum: ExpressionType */,
"data": {
"permissions": {
"type": 6 /* Enum: PermissionsExpressionType */
}
},
"indirection_levels": [] /* Array of IndirectionLevel */
}