# Lookup

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.Lookup/

One selected value list item or object in a lookup value.

To set a lookup, `value_list_item_info.obj_id` is enough: the value list ID (for a lookup to
objects, the object type ID) in `type` and the item ID in `item_id.internal_id`. In values read
from the server, `value_list_item_info` also has the item's `name`, `guid` and `external_id`, and
`version` is `OBJ_VER_VERSION_TYPE_LATEST` with `internal_version` -1.

- **Full name:** `MFiles.Lookup`
- **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-value_list_item_info"></a>`value_list_item_info` | [`ItemInfo`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ItemInfo/index.md) | 1 | The selected item. Only `obj_id` is needed when setting a value. |
| <a id="f-version"></a>`version` | [`ObjVerVersion`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjVerVersion/index.md) | 2 | The version of the selected object. The server returns `OBJ_VER_VERSION_TYPE_LATEST` (-1), meaning the latest version. |

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

## Used by methods

- [IRPCSearch.GetFolderContents](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCSearch/GetFolderContents/index.md): Lists the contents of a view or a view level: subviews, grouping folders and objects.

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

## Used in fields

- [`MultiSelectLookup.values`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.MultiSelectLookup/index.md#f-values): The selected items, each as a [Lookup](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.Lookup/index.md).
- [`ObjectVersionActivity.user`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjectVersionActivity/index.md#f-user): Information of user who created the version.
- [`TraditionalFoldersOrDelta.folders`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.TraditionalFoldersOrDelta/index.md#f-folders): Traditional folders. This contains inserted or updated traditional folders if this struct represents a delta, otherwise it contains just a "normal" array of traditional folders.
- [`TraditionalFolderWithParent.value`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.TraditionalFolderWithParent/index.md#f-value): Traditional folders. This contains inserted or updated traditional folders if this struct represents a delta, otherwise it contains just a "normal" array of traditional folders.
- [`TypedValueUnion.lookup`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.TypedValueUnion/index.md#f-lookup): The value of `DATATYPE_LOOKUP`: one value list item or object.
- [`GetFolderContentsResponse.traditional_folders`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCSearch/GetFolderContents/index.md#response): Resulting traditional folders array.
