Skip to main content

Lookup

Single-value lookup datatype.

NameDescriptionType
value_list_item_infoItem info (e.g. IDs (internal and external), GUID, flags, and name).ItemInfo
versionThe version number of the item. If eObjVerVersionTypeLatest, refers to the latest checked-in version of the item.ObjVerVersion

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
CreateCreate a new Lookup object representing a value list item.item: number
valueList: number
title: string
Lookup

Instance Methods

MethodDescriptionParametersReturns
ToStringString representation of the Lookup object.string | null

Properties

PropertyTypeDescription
Itemnumber | nullItem (internal) ID.
ValueListnumber | nullValue list ID.
Titlestring | nullTitle (name) of the value list item.
Versionnumber | nullVersion of the Lookup item.
DeletedbooleanIs value list item deleted?

Creating Objects

// Create a new Lookup object representing a value list item.
const result = Lookup.Create(0, 0, "example string");

Working with Objects

// Extension helpers for Lookup instances
// String representation of the Lookup object.
const result = lookupInstance.ToString();

// Item (internal) ID.
const item = lookupInstance.Item;
lookupInstance.Item = 0;

// Value list ID.
const valuelist = lookupInstance.ValueList;
lookupInstance.ValueList = 0;

// Title (name) of the value list item.
const title = lookupInstance.Title;
lookupInstance.Title = "example string";

// Version of the Lookup item.
const version = lookupInstance.Version;
lookupInstance.Version = 0;

// Is value list item deleted?
const deleted = lookupInstance.Deleted;

Example

{
"value_list_item_info": {
"obj_id": {
"type": 0,
"item_id": {
"internal_id": 0,
"external_repository_id": {
"connection": "<connection>",
"item": "<item>"
}
}
},
"name": "<name>",
"external_id_status": 5 /* Enum: ExtIDStatus */,
"external_id": "<external id>",
"guid": "<guid>",
"options": {
"all": false,
"is_shortcut": false,
"is_deleted": false,
"is_accessed_by_valid": false,
"has_shared_files": false,
"is_conflict_object": false,
"is_normal": false,
"is_view": false,
"has_external_data": false,
"is_referred_external_object": false,
"is_external_origin": false,
"is_omitted_from_database": false
},
"external_repository_icon_id": "<external repository icon id>"
},
"version": {
"type": 7 /* Enum: ObjVerVersionType */,
"internal_version": 0,
"external_repository_version": "<external repository version>",
"external_repository_sort_key": 0
}
}