# IRPCFolderUISettings.GetFolderUIState

Location: [gRPC API](https://developer.m-files.com/APIs/gRPC-API/index.md) > [Vault API](https://developer.m-files.com/APIs/gRPC-API/vault/index.md) > [Folder UI settings](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCFolderUISettings/index.md)

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

Badges: `Vault API / standard` `write` `session` `returns metadata structure version`

Gets the display settings of a folder location as a structure.

- **Service:** [Folder UI settings](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCFolderUISettings/index.md) `MFiles.IRPCFolderUISettings`
- **gRPC method:** `/MFiles.IRPCFolderUISettings/GetFolderUIState`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/get-folder-uistate`
- **Request:** [`GetFolderUIStateRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCFolderUISettings/GetFolderUIState/index.md#request)
- **Response:** [`GetFolderUIStateResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCFolderUISettings/GetFolderUIState/index.md#response)
- **Book and level:** Vault API, standard
- **Kind:** write
- **Session:** Required: the session ID from LogIn in the mfiles-session-id-bin metadata.
- **Idempotent:** no
- **Returns metadata structure version:** yes (in the mfiles-metadata-version-bin trailer)
- **Streaming:** none (unary)

<a id="remarks"></a>

## Remarks

- Requires a vault session. No special vault rights are needed.
- The server resolves the folder from `folder_location`, for example a view folder followed by
  property folders. An empty location means the vault root. Set `type` for folders that a
  location cannot express, such as `UISETTINGS_FOLDER_TYPE_HISTORY_UI`; the resolved ID is
  returned in `folder_uistate.folder_id`.
- With `common_settings` false, returns the caller's effective settings (own, then common, then
  program defaults); with true, the common settings. `program_defaults` true returns the program
  defaults and overrides `common_settings`.
- Column positions in the returned listing state are not always numbered from 0: state read from
  settings that older clients saved can number the visible columns from 1. Renumber them before
  sending the state back with
  [SetFolderUIState](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCFolderUISettings/SetFolderUIState/index.md).

<a id="request"></a>

## Request: GetFolderUIStateRequest

> Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page.

| Field | Type | Description |
|---|---|---|
| `common_settings` | `bool` | True for the common settings; false for the caller's effective settings. |
| `object_folder` | `bool` | True when the location is an object's folder (its files) inside `folder_location`. Prefer `type` `UISETTINGS_FOLDER_TYPE_OBJECT_FILES_CONTAINER`. |
| `folder_location[]` | repeated [`Folder`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.Folder/index.md) | The path of folders from the vault root to the folder. Empty for the root. |
| `folder_location[].type` | [`FolderType`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.FolderType/index.md) | The type of the folder, for example `FOLDER_TYPE_VIEW_FOLDER` or `FOLDER_TYPE_PROPERTY_FOLDER`. Values: `FOLDER_TYPE_UNKNOWN` (0), `FOLDER_TYPE_ANY_FOLDER` (1), `FOLDER_TYPE_VIEW_FOLDER` (2), `FOLDER_TYPE_PROPERTY_FOLDER` (3), `FOLDER_TYPE_TRADITIONAL_FOLDER` (4), `FOLDER_TYPE_SEARCH_FOLDER` (5), `FOLDER_TYPE_EXTERNAL_VIEW_FOLDER` (6). |
| `folder_location[].data` | [`FolderInfoUnion`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.FolderInfoUnion/index.md) | Additional folder type -specific information as a union. |
| `folder_location[].data.any_folder` | [`FolderInfoUnion.AnyFolderData`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.FolderInfoUnion/index.md#t-AnyFolderData) (oneof data) | Any folder type. |
| `folder_location[].data.view_folder` | [`FolderInfoUnion.ViewFolderData`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.FolderInfoUnion/index.md#t-ViewFolderData) (oneof data) | View folder type. |
| `folder_location[].data.property_folder` | [`FolderInfoUnion.PropertyFolderData`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.FolderInfoUnion/index.md#t-PropertyFolderData) (oneof data) | Property (virtual) folder type. |
| `folder_location[].data.traditional_folder` | [`FolderInfoUnion.TraditionalFolderData`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.FolderInfoUnion/index.md#t-TraditionalFolderData) (oneof data) | Traditional folder type. |
| `folder_location[].data.search_folder` | [`FolderInfoUnion.SearchFolderData`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.FolderInfoUnion/index.md#t-SearchFolderData) (oneof data) | Search folder (extended view folder) type. |
| `folder_location[].data.external_view_folder` | [`FolderInfoUnion.ExternalViewFolderData`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.FolderInfoUnion/index.md#t-ExternalViewFolderData) (oneof data) | External view folder type. |
| `max_data_version_interpretable` | `int32` | The newest settings data version that the caller understands. Use 15. |
| `type` | [`UISettingsFolderType`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.UISettingsFolderType/index.md) | The folder type, for folders whose type cannot be resolved from the location (such as the history or relationships dialogs). Leave unset to resolve it from `folder_location`. |
| `program_defaults` | `bool` | True to get the program defaults, ignoring stored and common settings. |

<a id="response"></a>

## Response: GetFolderUIStateResponse

A structure that specifies the response type for the GetFolderUIState method.

> Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page.

| Field | Type | Description |
|---|---|---|
| `folder_uistate` | [`FolderUIState`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.FolderUIState/index.md) | The display settings, including the resolved `folder_id`. |
| `folder_uistate.folder_id` | [`UISettingsFolderID`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.UISettingsFolderID/index.md) | The ID that describes the folder. |
| `folder_uistate.folder_id.type` | [`UISettingsFolderType`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.UISettingsFolderType/index.md) | The type that describes the folder whose UI settings are being retrieved. |
| `folder_uistate.folder_id.view` | `int32` | If not zero, specifies the view where the folder is located. |
| `folder_uistate.folder_type` | [`ShellFolderType`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.ShellFolderType/index.md) | Specifies shell folder type. Values: `SHELL_FOLDER_TYPE_NORMAL` (0), `SHELL_FOLDER_TYPE_OBJECT_HISTORY` (2), `SHELL_FOLDER_TYPE_NON_OBJECT_ITEMS` (3), `SHELL_FOLDER_TYPE_RELATIONSHIPS` (4), `SHELL_FOLDER_TYPE_SUBOBJECTS` (5), `SHELL_FOLDER_TYPE_COLLECTION_MEMBERS` (6), `SHELL_FOLDER_TYPE_DELETED_CONFLICT_HISTORY` (7). |
| `folder_uistate.show_right_pane` | `bool` | Specifies whether the right pane is displayed. |
| `folder_uistate.show_bottom_pane` | `bool` | Specifies whether the bottom pane is displayed. |
| `folder_uistate.is_bottom_pane_minimized` | `bool` | Specifies whether the bottom pane is minimized. |
| `folder_uistate.is_right_pane_minimized` | `bool` | Specifies whether the right pane is minimized. |
| `folder_uistate.show_metadata_editorn_right_pane` | `bool` | Specifies whether the metadata editor is displayed in the right pane. If false, the metadata editor appears in the bottom pane. |
| `folder_uistate.is_hit_highlighting_enabled` | `bool` | Specifies whether hit highlighting in file content is enabled. |
| `folder_uistate.bottom_pane_height` | `int32` | Specifies the bottom pane height. The height is relative to the size of the frame window holding the bottom pane bar. |
| `folder_uistate.right_pane_width` | `int32` | Specifies the right pane width. |
| `folder_uistate.show_task_pane` | `bool` | Specifies whether the task area is displayed. |
| `folder_uistate.is_task_pane_minimized` | `bool` | Specifies whether the task area is minimized. |
| `folder_uistate.listing_ui_state` | [`FolderListingUIState`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.FolderListingUIState/index.md) | The listing UI state. |
| `folder_uistate.listing_ui_state.columns[]` | repeated [`FolderListingColumn`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.FolderListingColumn/index.md) | The Columns. |
| `folder_uistate.listing_ui_state.column_sorting[]` | repeated [`FolderListingColumnSorting`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.FolderListingColumnSorting/index.md) | The ColumnSortings. |
| `folder_uistate.listing_ui_state.view_mode` | [`FolderListingViewMode`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.FolderListingViewMode/index.md) | The listing view mode. Values: `FOLDER_LISTING_VIEW_MODE_UNINITIALIZED` (0), `FOLDER_LISTING_VIEW_MODE_ICON` (1), `FOLDER_LISTING_VIEW_MODE_SMALL_ICON` (2), `FOLDER_LISTING_VIEW_MODE_LIST` (3), `FOLDER_LISTING_VIEW_MODE_DETAILS` (4), `FOLDER_LISTING_VIEW_MODE_THUMBNAIL` (5), `FOLDER_LISTING_VIEW_MODE_TILE` (6), `FOLDER_LISTING_VIEW_MODE_THUMBSTRIP` (7), `FOLDER_LISTING_VIEW_MODE_CONTENT` (8). |
| `folder_uistate.listing_ui_state.item_grouping_mode` | [`FOLDERLISTINGITEMGROUPINGMODEFLAGS`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.FOLDERLISTINGITEMGROUPINGMODEFLAGS/index.md) | The listing item grouping mode. |
| `folder_uistate.listing_ui_state.icon_size` | `int32` | The listing item icon size. |
| `folder_uistate.listing_ui_state.results_per_page` | `uint32` | The results per page option. |
| `has_selected_folders` | `bool` | True when the caller has a stored folder selection (see [SetFolderSelection](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCFolderUISettings/SetFolderSelection/index.md)) for exactly this location. |

<a id="related"></a>

## Related methods

- [SetFolderUIState](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCFolderUISettings/SetFolderUIState/index.md): Saves the display settings of a folder location from a structure, for the caller and optionally as the common settings.
