Overview
There is a limitation with M-Files HTTPS REST API queries when using an M-Files view widget that has a combination of sub-views, a metadata query is in use, and the metadata query has a long object relationship path defined. The limitation of the REST API URI query string is 2000 characters.
If you are using M-Files HTTPS REST API to connect to M-Files (this can be identified if you have a warning asking you to enable gRPC for optimal performances) and you have configured a long metadata query and are using sub-views in an M-Files view widget, you might not see the widget to display the results in the widget and see first a widget status spinning:
After a while you will see a warning icon in the widget and no items are displayed in the view:
Solution
Workaround can be one or more of the following:
- Try not to use sub-views, i.e., have the view on the main level in M-Files
- Use more specific filters in M-Files views
- Change the vault object structure so that the metadata query object path does not become so long if possible
If you keep using REST API, please be aware that you may encounter another limitation about the number of items displayed in your widget:
/article/The-Hubshare-M-Files-widget-shows-only-200-items
Solution:
- Enable gRPC connection on the M-Files server side. For more information see the reference document Setting Up M-Files to Use gRPC
