Skip to main content

PropertyValue

Struct for a single property value.

NameDescriptionType
property_defProperty definition ID.number
valueThe value of the property.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
CreateCreates a new PropertyValue.propertyDef: number
type: Datatype
value: TypedValueValueMap[T]
PropertyValue
CreateWithTypedValueCreates a new PropertyValue with a TypedValue.propertyDef: number
value: TypedValue
PropertyValue
TextCreates a new PropertyValue of type Text.propertyDef: number
value: TypedValueValueMap[Datatype.DATATYPE_TEXT]
PropertyValue
FloatCreates a new PropertyValue of type Real Number (Float).propertyDef: number
value: TypedValueValueMap[Datatype.DATATYPE_REAL_NUMBER]
PropertyValue
BoolCreates a new PropertyValue of type Boolean.propertyDef: number
value: TypedValueValueMap[Datatype.DATATYPE_BOOLEAN]
PropertyValue
LookupCreates a new PropertyValue of type Lookup.propertyDef: number
value: TypedValueValueMap[Datatype.DATATYPE_LOOKUP]
PropertyValue
DateCreates a new PropertyValue of type Date.propertyDef: number
value: TypedValueValueMap[Datatype.DATATYPE_DATE]
PropertyValue
TimestampCreates a new PropertyValue of type Timestamp.propertyDef: number
value: TypedValueValueMap[Datatype.DATATYPE_TIMESTAMP]
PropertyValue
MultiLookupCreates a new PropertyValue of type Multi-Select Lookup.propertyDef: number
value: TypedValueValueMap[Datatype.DATATYPE_MULTI_SELECT_LOOKUP]
PropertyValue
IntCreates a new PropertyValue of type Integer.propertyDef: number
value: TypedValueValueMap[Datatype.DATATYPE_INTEGER]
PropertyValue
MultiTextCreates a new PropertyValue of type Multi-Line Text.propertyDef: number
value: TypedValueValueMap[Datatype.DATATYPE_MULTI_LINE_TEXT]
PropertyValue
TimeCreates a new PropertyValue of type Time.propertyDef: number
value: TypedValueValueMap[Datatype.DATATYPE_TIME]
PropertyValue

Instance Methods

MethodDescriptionParametersReturns
SetTextSet the text value.value: TypedValueValueMap[Datatype.DATATYPE_TEXT]void
SetMultiTextSet the multi-line text value.value: TypedValueValueMap[Datatype.DATATYPE_MULTI_LINE_TEXT]void
SetBoolSet the boolean value.value: TypedValueValueMap[Datatype.DATATYPE_BOOLEAN]void
SetIntSet the integer value.value: TypedValueValueMap[Datatype.DATATYPE_INTEGER]void
SetDateSet the date value.value: TypedValueValueMap[Datatype.DATATYPE_DATE]void
SetLookupSet the lookup value.value: TypedValueValueMap[Datatype.DATATYPE_LOOKUP]void
SetFloatSet the float (real number) value.value: TypedValueValueMap[Datatype.DATATYPE_REAL_NUMBER]void
SetMultiLookupSet the multi-select lookup value.value: TypedValueValueMap[Datatype.DATATYPE_MULTI_SELECT_LOOKUP]void
SetTimeSet the time value.value: TypedValueValueMap[Datatype.DATATYPE_TIME]void
SetTimestampSet the timestamp value.value: TypedValueValueMap[Datatype.DATATYPE_TIMESTAMP]void

Creating Objects

// Creates a new PropertyValue.
const result = PropertyValue.Create(0, 0);

// Creates a new PropertyValue with a TypedValue.
const result = PropertyValue.CreateWithTypedValue(
0,
TypedValue.Text("example text"),
);

// Creates a new PropertyValue of type Text.
const result = PropertyValue.Text(0, "example text");

// Creates a new PropertyValue of type Real Number (Float).
const result = PropertyValue.Float(0, 42);

// Creates a new PropertyValue of type Boolean.
const result = PropertyValue.Bool(0, true);

// Creates a new PropertyValue of type Lookup.
const result = PropertyValue.Lookup(0, new Lookup());

// Creates a new PropertyValue of type Date.
const result = PropertyValue.Date(0, new Date());

// Creates a new PropertyValue of type Timestamp.
const result = PropertyValue.Timestamp(0, new Date());

// Creates a new PropertyValue of type Multi-Select Lookup.
const result = PropertyValue.MultiLookup(0, []);

// Creates a new PropertyValue of type Integer.
const result = PropertyValue.Int(0, 42);

// Creates a new PropertyValue of type Multi-Line Text.
const result = PropertyValue.MultiText(0, "example text");

// Creates a new PropertyValue of type Time.
const result = PropertyValue.Time(0, new Date());

Working with Objects

// Extension helpers for PropertyValue instances
// Set the text value.
const result = propertyvalueInstance.SetText("example text");

// Set the multi-line text value.
const result = propertyvalueInstance.SetMultiText("example text");

// Set the boolean value.
const result = propertyvalueInstance.SetBool(true);

// Set the integer value.
const result = propertyvalueInstance.SetInt(42);

// Set the date value.
const result = propertyvalueInstance.SetDate(new Date());

// Set the lookup value.
const result = propertyvalueInstance.SetLookup(new Lookup());

// Set the float (real number) value.
const result = propertyvalueInstance.SetFloat(42);

// Set the multi-select lookup value.
const result = propertyvalueInstance.SetMultiLookup([]);

// Set the time value.
const result = propertyvalueInstance.SetTime(new Date());

// Set the timestamp value.
const result = propertyvalueInstance.SetTimestamp(new Date());

Example

{
"property_def": 0,
"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 */
}
}
}
}