Hello,
I would like to get contents of MFFolderContentItemTypePropertyFolder of a view as shown in the attached image and also how do I get the ID 15. Thank you
Hello,
I would like to get contents of MFFolderContentItemTypePropertyFolder of a view as shown in the attached image and also how do I get the ID 15. Thank you
But I don't know the interface to use for looping for example in getting the contens we use FolderContentItem in a loop. e.g.
foreach (FolderContentItem item in mfilesSearchResult)
{
}
. so, what do we use in Levels?
Show me a picture of the structure you have and what you want to output.
Broadly I think you need to convert the folder content item that represents the grouping across to a folder def, and use that to request the next set of data. But I'm not sure on the specifics until I can picture the output you're after.
I want to know how to pull or extract the property used in grouping the way it is written there as shown such as the
Year(Created) and Month(Created)
In the other thread we talked about getting the view via the API. The levels on the view is an ExpressionExs instances: M-Files API - Levels Property.
This is effectively a collection of ExpressionEx instances: M-Files API
The ExpressionEx contains an Expression: M-Files API - Expression Object
The Expression details the details about the grouping. You probably want to look at the Type, for example, to ensure that it's a property grouping: M-Files API - Type Property
For property groupings you need to look at the Expression's DataPropertyValuePropertyDef which contains the property that it's grouped by ("Created" in your screenshot above): M-Files API - DataPropertyValuePropertyDef Property. This is an ID which you would cross-reference with the property definitions in the vault (e.g. M-Files API - GetPropertyDefs Method).
Some groupings may also contain additional data, as well as the property. For example you can find out about the data function (year/month) from the DataPropertyValueDataFunction property: M-Files API - DataPropertyValueDataFunction Property
There's also lots of other data in the Expression which may be of interest including, for example, indirection levels.
If you need to get all this information programmatically then you'd look at all of the above and be able to get what you need. There is also a "GetExpressionAsText" method which may give you the simple string, if that's all you need: M-Files API - GetExpressionAsText Method
© 2024 M-Files, All Rights Reserved.