Expression
Expression that can be evaluated for any object.
| Name | Description | Type |
|---|---|---|
type | The type of the expression (e.g. property value or status value). | ExpressionType |
data | NOTE: These two members store the indirection levels of this expression. Normally, when an expression that does not have indirection levels is evaluated for an object, only the data of the object is needed for the evaluation. For example, property value expression "Project" is evaluated from the Project property of the object. When one or more indirection levels are present, these indirection levels (links) need to be followed in order to evaluate the expression. For example, expression "Project.Customer.Country" first needs to determine the Project property of the object, then the Customer property of the project, and finally the Country property of the customer. In this specification, "Project.Customer" is defined as the two indirection levels of the expression. They are stored in this order in the array of MF_PropertyDefOrObjectType structs. The Country part is specified normally as if no indirection levels would be present. | ExpressionUnion |
indirection_levels | The 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 Overview/VaultMessages/.
Factory Methods
| Method | Description | Parameters | Returns |
|---|---|---|---|
Text | Creates a new Text expression. | options: FTSFLAGS | Expression |
Status | Creates a new Status expression. | type: StatusType | Expression |
Property | Creates a new Property expression for the specified property definition ID. | propertyDef: number | Expression |
AnyLookupProperty | Creates a new AnyLookupProperty expression for the specified value list. | valueList: number | Expression |
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 */
}