# ValueList

Location: [gRPC API](https://developer.m-files.com/APIs/gRPC-API/index.md) > [Reference](https://developer.m-files.com/APIs/gRPC-API/Reference/index.md) > [Messages](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/index.md)

HTML version: https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ValueList/

An object type or a value list (basic definition). Despite the name, this message describes
both: `is_real_object_type` is true for object types, whose items are objects.

Returned by [GetObjectTypes](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectTypes/GetObjectTypes/index.md),
[GetObjectType](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectTypes/GetObjectType/index.md),
[GetValueLists](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCValueLists/GetValueLists/index.md) and
[GetValueList](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCValueLists/GetValueList/index.md). Lists that the caller is not allowed
to see are returned with empty names and `object_type_permissions.can_user_see` false.

- **Full name:** `MFiles.ValueList`
- **Proto file:** [`mfiles/structs.proto`](https://developer.m-files.com/APIs/gRPC-API/downloads/proto/mfiles/structs.proto)

<a id="fields"></a>

## Fields

| Field | Type | Number | Description |
|---|---|---|---|
| <a id="f-id"></a>`id` | `int32` | 1 | The ID of the object type or value list. Object types and value lists share one ID space; property definition IDs and item IDs are separate spaces. |
| <a id="f-name_singular"></a>`name_singular` | `string` | 2 | The singular name, for example "Customer". Empty if the caller is not allowed to see the list. |
| <a id="f-name_plural"></a>`name_plural` | `string` | 3 | The plural name, for example "Customers". Empty if the caller is not allowed to see the list. |
| <a id="f-icon"></a>`icon` | `bytes` | 4 | The icon in .ICO format. Filled only by GetObjectTypes and GetObjectType, and only for real object types; empty in GetValueLists and GetValueList. |
| <a id="f-is_real_object_type"></a>`is_real_object_type` | `bool` | 5 | True for an object type, whose items are objects (documents, customers); false for a plain value list (Country, Classes, Users). |
| <a id="f-is_hierarchical"></a>`is_hierarchical` | `bool` | 6 | True if items can have a parent item in the same list (`ValueListItem.has_parent`). |
| <a id="f-has_owner"></a>`has_owner` | `bool` | 7 | True if every item belongs to an item of another list, the owner list (`owner_object_type`). For example, contact persons are owned by customers. |
| <a id="f-owner_object_type"></a>`owner_object_type` | `int32` | 8 | With `has_owner`, the ID of the owner list or object type. |
| <a id="f-owner_property_def"></a>`owner_property_def` | `int32` | 9 | Owner property def. Subobjects of objects of this object type have this property in their meta data for describing owner relationships. |
| <a id="f-options"></a>`options` | [`OBJTYPEFLAGS`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.OBJTYPEFLAGS/index.md) | 10 | Flags of the list, for example `can_add_items` and `is_external`. See [OBJTYPEFLAGS](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.OBJTYPEFLAGS/index.md). |
| <a id="f-default_property_def"></a>`default_property_def` | `int32` | 11 | The ID of the lookup property definition that refers to items of this list by default, for example 1079 (Customer) for the Customer object type. |
| <a id="f-read_only_properties_during_insert"></a>`read_only_properties_during_insert` | repeated `int32` | 12 | The propertydef IDs of those properties that cannot be entered during the creation of a new object because they are not included in the INSERT INTO statement. |
| <a id="f-read_only_properties_during_update"></a>`read_only_properties_during_update` | repeated `int32` | 13 | The propertydef IDs of those properties that cannot be entered during the editing of an existing object because they are not included in the UPDATE statement. |
| <a id="f-targets_for_browsing"></a>`targets_for_browsing` | repeated [`ObjectTypeTargetForBrowsing`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjectTypeTargetForBrowsing/index.md) | 14 | Object type targets for browsing. |
| <a id="f-acl"></a>`acl` | [`AccessControlList`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.AccessControlList/index.md) | 15 | Specifies the ACL that defines the visibility and other permission settings of this object type. Also specifies who can add new items to this object type. |
| <a id="f-object_type_permissions"></a>`object_type_permissions` | [`ObjectTypePermissionsForClient`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjectTypePermissionsForClient/index.md) | 20 | What the caller may do with the list: see it (`can_user_see`) and add items or objects (`can_user_add_new_items`). Filled by the read calls of IRPCObjectTypes and IRPCValueLists. |
| <a id="f-default_acl_for_objects"></a>`default_acl_for_objects` | [`AccessControlList`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.AccessControlList/index.md) | 16 | Default ACL for new items/objects of this type. If unset, the global default is used (vlitems: read access to all internal users; real objects: full control for all internal users). |
| <a id="f-vl_sorting_type_reserved"></a>`vl_sorting_type_reserved` | [`VLSortingType`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.VLSortingType/index.md) | 17 | The sorting type of value list items. NOTE: This value is not currently used but is reserved for future use. Currently, sorting order is specified on the property definition level only. Values: `VLSORTING_TYPE_BY_DISPLAY_NAME` (0), `VLSORTING_TYPE_BY_EXTERNAL_ID` (1). |
| <a id="f-sort_ascending_reserved"></a>`sort_ascending_reserved` | `bool` | 18 | True to sort in ascending order, false to sort in descending order. NOTE: This value is not currently used but is reserved for future use. Currently, sorting order is specified on the property definition level only. |
| <a id="f-guid"></a>`guid` | `string` | 19 | The GUID of the object type or value list, with braces. Resolve it to the vault's ID with [GetMetadataStructureItemIdByGUID](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVault/GetMetadataStructureItemIdByGUID/index.md). |
| <a id="f-preferred_title_property_def_id"></a>`preferred_title_property_def_id` | `int32` | 21 | Property definition ID of the title property for the user's preferred language. |
| <a id="f-search_characteristics"></a>`search_characteristics` | [`ObjectTypeSearchCharacteristics`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjectTypeSearchCharacteristics/index.md) | 22 | If set, specifies search characteristics of the object type. |
| <a id="f-indexing_definition"></a>`indexing_definition` | [`ObjectTypeIndexingDefinition`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjectTypeIndexingDefinition/index.md) | 23 | If set, defines the indexed value lists and properties of the object type. Used for searching from Master Storage. |
| <a id="f-view_id"></a>`view_id` | `int32` | 24 | The ID of the object type specific view. |

<a id="used-by-methods"></a>

## Used by methods

- [IRPCObjectTypes.GetObjectType](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectTypes/GetObjectType/index.md): Gets one object type or value list by ID, with its icon.
- [IRPCObjectTypes.GetObjectTypes](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectTypes/GetObjectTypes/index.md): Gets all object types (real object types only, not plain value lists), with their icons.
- [IRPCValueLists.GetValueList](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCValueLists/GetValueList/index.md): Gets one value list or object type by ID, without its icon.
- [IRPCValueLists.GetValueLists](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCValueLists/GetValueLists/index.md): Gets all value lists of the vault, including the object types, without icons.

<a id="used-in-fields"></a>

## Used in fields

- [`ObjectTypeAndValueListStructureResponse.object_types_and_value_lists`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjectTypeAndValueListStructureResponse/index.md#f-object_types_and_value_lists): The object type and value list entries.
- [`ValueListAdmin.object_type`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ValueListAdmin/index.md#f-object_type): Basic data.
- [`GetObjectTypesResponse.object_types`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectTypes/GetObjectTypes/index.md#response): The real object types of the vault, including those the user cannot see (with empty names). See [ValueList](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ValueList/index.md).
- [`GetObjectTypeResponse.putf8szobjtypebasic`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectTypes/GetObjectType/index.md#response): The object type or value list. See [ValueList](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ValueList/index.md).
- [`GetValueListsResponse.value_lists`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCValueLists/GetValueLists/index.md#response): All value lists and object types, including those the user cannot see (with empty names). See [ValueList](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ValueList/index.md).
- [`GetValueListResponse.object_type_basic`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCValueLists/GetValueList/index.md#response): The value list. See [ValueList](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ValueList/index.md).
