Folder UI settings (IRPCFolderUISettings)
Stores the display settings of folders per user and as common defaults.
| gRPC service | MFiles.IRPCFolderUISettings |
|---|---|
| Book and level | Vault API, standard |
| Methods | 7 |
| Proto file | mfiles/IRPCFolderUISettings.proto |
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: 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, SetFolderUIState and ResetFolderUIStateToDefaults exchange a FolderUIState. The get and set methods take a folder location (a path of Folder elements from the vault root) and resolve the folder ID on the server.
- Opaque blobs (M-Files Desktop): GetFolderUISettings, SaveFolderUISettings and ResetFolderUISettingsToDefaults 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 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.
Methods
| Method | Summary | Facts |
|---|---|---|
| GetFolderUISettings | Gets the display settings of a folder as an opaque blob. | read session idempotent returns metadata structure version |
| GetFolderUIState | Gets the display settings of a folder location as a structure. | write session returns metadata structure version |
| ResetFolderUISettingsToDefaults | 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 | 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 | 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 | 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 | 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 |