# Folder UI settings (IRPCFolderUISettings)

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)

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

Stores the display settings of folders per user and as common defaults.

- **gRPC service:** `MFiles.IRPCFolderUISettings`
- **Book and level:** [Vault API](https://developer.m-files.com/APIs/gRPC-API/vault/index.md), standard
- **Methods:** 7
- **Proto file:** [`mfiles/IRPCFolderUISettings.proto`](https://developer.m-files.com/APIs/gRPC-API/downloads/proto/mfiles/IRPCFolderUISettings.proto)

<a id="overview"></a>

## Overview

Stores the display settings of folders: which listing columns are shown and how wide, sorting,
grouping, view mode, and the layout of the panes. Settings are kept per user and folder, and an
administrator can save common settings that users get by default. Used by M-Files clients;
applications rarely call it.

A folder is identified by a [UISettingsFolderID](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.UISettingsFolderID/index.md): a folder type
(`UISETTINGS_FOLDER_TYPE_...`) and, for folders inside a view, the view ID. All folders of the
same type in one view share their settings.

Two families of methods work on the same stored settings:

- **Structured state** (newer clients):
  [GetFolderUIState](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCFolderUISettings/GetFolderUIState/index.md),
  [SetFolderUIState](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCFolderUISettings/SetFolderUIState/index.md) and
  [ResetFolderUIStateToDefaults](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCFolderUISettings/ResetFolderUIStateToDefaults/index.md)
  exchange a [FolderUIState](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.FolderUIState/index.md). The get and set methods take a folder
  location (a path of [Folder](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.Folder/index.md) elements from the vault root) and resolve
  the folder ID on the server.
- **Opaque blobs** (M-Files Desktop):
  [GetFolderUISettings](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCFolderUISettings/GetFolderUISettings/index.md),
  [SaveFolderUISettings](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCFolderUISettings/SaveFolderUISettings/index.md) and
  [ResetFolderUISettingsToDefaults](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCFolderUISettings/ResetFolderUISettingsToDefaults/index.md)
  exchange the client's binary format. A non-empty blob starts with its data version as a 32-bit
  little-endian integer, which must equal the version it is saved with; an empty blob means the
  program defaults.

**Data versions.** Every stored setting has a data version. Readers pass
`max_data_version_interpretable`; the server returns the newest stored version that is not
greater. The structured state is stored in data version 15 on current servers.

**Lookup order** when reading a user's settings: the user's own settings, then the common
settings, then the program defaults.

**Rights.** Any user can store their own settings. Saving common settings, or resetting all users
to them, needs the vault right `manage_common_uisettings`. Common settings cannot be stored for a
folder in a user's own (not common) view, and only the owner of such a view can store settings
for its folders. Anonymous sessions cannot save settings.

[SetFolderSelection](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCFolderUISettings/SetFolderSelection/index.md) stores a different
per-user setting: folders that the user wants to see on a view level whose listing is cut by the
folder limit.

<a id="methods"></a>

## Methods

| Method | Summary | Facts |
|---|---|---|
| [GetFolderUISettings](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCFolderUISettings/GetFolderUISettings/index.md) | Gets the display settings of a folder as an opaque blob. | `read` `session` `idempotent` `returns metadata structure version` |
| [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. | `write` `session` `returns metadata structure version` |
| [ResetFolderUISettingsToDefaults](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCFolderUISettings/ResetFolderUISettingsToDefaults/index.md) | Resets the caller's display settings of a folder to the program defaults or to the common settings, and returns the result as an opaque blob. | `write` `session` `idempotent` `returns metadata structure version` |
| [ResetFolderUIStateToDefaults](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCFolderUISettings/ResetFolderUIStateToDefaults/index.md) | Resets the caller's display settings of a folder to the program defaults or to the common settings, and returns the resulting state as a structure. | `write` `session` `idempotent` `returns metadata structure version` |
| [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. | `write` `session` `idempotent` `returns metadata structure version` |
| [SetFolderSelection](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCFolderUISettings/SetFolderSelection/index.md) | Replaces the calling user's folder selection for one view level: the folders that the user always wants to see on a level whose listing is cut by the folder limit. | `write` `session` `idempotent` `returns metadata structure version` |
| [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. | `write` `session` `returns metadata structure version` |
