# IRPCFolderUISettings.SetFolderUIState

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/SetFolderUIState/

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

Saves the display settings of a folder location from a structure, for the caller and optionally
as the common settings.

- **Service:** [Folder UI settings](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCFolderUISettings/index.md) `MFiles.IRPCFolderUISettings`
- **gRPC method:** `/MFiles.IRPCFolderUISettings/SetFolderUIState`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/set-folder-uistate`
- **Request:** [`SetFolderUIStateRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCFolderUISettings/SetFolderUIState/index.md#request)
- **Response:** [`SetFolderUIStateResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCFolderUISettings/SetFolderUIState/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. Saving common settings needs the vault right
  `manage_common_uisettings`.
- The server resolves the folder from `folder_location` and `type` as in
  [GetFolderUIState](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCFolderUISettings/GetFolderUIState/index.md).
- Set `max_data_version_interpretable` to 15: the server stores the state in that data version
  and fails with "The parameter is incorrect." for any other value.
- The listing columns are validated: the visible columns must have unique positions numbered
  from 0 ("The first visible column should have position 0.", "Non-unique column position.").
  Hidden columns use position -1.
- With `save_as_common_settings` and `reset_common_settings_to_all_users`, every user's settings
  of the folder are overwritten, as with
  [SaveFolderUISettings](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCFolderUISettings/SaveFolderUISettings/index.md).

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

## Request: SetFolderUIStateRequest

> 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 |
|---|---|---|
| `save_as_common_settings` | `bool` | True to also save the state as the common settings of the folder. |
| `reset_common_settings_to_all_users` | `bool` | True to also overwrite every user's settings of the folder. Used only with `save_as_common_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 data version to store. Must be 15. |
| `folder_uistate` | [`FolderUIState`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.FolderUIState/index.md) | The display settings to store. |
| `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. |
| `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. Leave unset to resolve it from `folder_location`. |

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

## Response: SetFolderUIStateResponse

No fields.

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

## Related methods

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