Home
About
Search
Welcome to M-Files Empower – our new support experience. We'd love to hear what you think!Give feedback
Home/Support and troubleshooting/Troubleshooting/Common problems

Change in PropertyDef serialization to JSON in 22.11

Last updated on 2 January 2023

Admin
REST API

Overview

In the 22.11 (November 2022) release of M-Files, the way a PropertyDef is serialized to JSON has changed in case the property definition has a Filter defined in M-Files Admin.

In case your integration (e.g., REST API calls) rely on that specific structure, they may break or may start returning unexpected or incomplete information. For example, getting the property definitions can return such data.

Details

Below follow example JSON structures of a sample property definition with a basic filter, and a screenshot of a difference between them.

The StaticFilters array used to have a field PropertyDefOrObjectTypeArray that has some information about the filter. Now this filter is a more complete filter expression serialized in the Expression field.

image.png

OLD serialization

            {

                        "IsCreatePermissionAllowed": true,

                        "Permissions": {

                                    "CanRead": true,

                                    "CanEdit": true,

                                    "CanAttachObjects": false

                        },

                        "AllObjectTypes": true,

                        "AutomaticValueType": 0,

                        "BasedOnValueList": true,

                        "ContentType": 0,

                        "DataType": 9,

                        "DependencyPD": -106,

                        "DependencyRelation": 2,

                        "GUID": "{476AFCF1-E520-4F18-9232-25F06CBE30C2}",

                        "ID": 1020,

                        "Name": "Related Document",

                        "ObjectType": 0,

                        "OwnerPropertyDef": {

                                    "ID": -106,

                                    "DependencyRelation": 2,

                                    "IsRelationFiltering": true

                        },

                        "Predefined": false,

                        "SortAscending": true,

                        "HasStaticFilter": true,

                        "StaticFilters": [

                                    {

                                                "PropertyDefOrObjectTypeArray": {

                                                            "PropertyDef": true,

                                                            "ID": 37

                                                },

                                                "ValuelistID": 0,

                                                "MFDataFunction": 0,

                                                "ConditionType": 1,

                                                "TypedValue": {

                                                            "Value": false,

                                                            "HasValue": true,

                                                            "DisplayValue": "No",

                                                            "SerializedValue": "False",

                                                            "DataType": 8,

                                                            "SortingKey": "",

                                                            "IsNumberSorting": false,

                                                            "HasAutomaticPermission": false

                                                }

                                    }

                        ],

                        "ThisIsConflictPD": false,

                        "ThisIsDefaultPD": false,

                        "ThisIsOwnerPD": false,

                        "UpdateType": 0,

                        "ValueList": 0,

                        "ValueListSortingType": 0,

                        "IsOwnerPropertyDef": false,

                        "SortingType": 0

            },

NEW serialization

            {

                        "IsCreatePermissionAllowed": true,

                        "Permissions": {

                                    "CanRead": true,

                                    "CanEdit": true,

                                    "CanAttachObjects": false

                        },

                        "AllObjectTypes": true,

                        "AutomaticValueType": 0,

                        "BasedOnValueList": true,

                        "ContentType": 0,

                        "DataType": 9,

                        "DependencyPD": -106,

                        "DependencyRelation": 2,

                        "GUID": "{476AFCF1-E520-4F18-9232-25F06CBE30C2}",

                        "ID": 1020,

                        "Name": "Related Document",

                        "ObjectType": 0,

                        "OwnerPropertyDef": {

                                    "ID": -106,

                                    "DependencyRelation": 2,

                                    "IsRelationFiltering": true

                        },

                        "Predefined": false,

                        "SortAscending": true,

                        "HasStaticFilter": true,

                        "StaticFilters": [

                                    {

                                                "MFDataFunction": 0,

                                                "ConditionType": 1,

                                                "TypedValue": {

                                                            "Value": false,

                                                            "HasValue": true,

                                                            "DisplayValue": "No",

                                                            "SerializedValue": "False",

                                                            "DataType": 8,

                                                            "SortingKey": "",

                                                            "IsNumberSorting": false,

                                                            "HasAutomaticPermission": false

                                                },

                                                "Expression": {

                                                            "ExpressionType": 1,

                                                            "DataStatusValueType": 0,

                                                            "DataPropertyValuePropertyDef": 37

                                                },

                                                "StatusValueType": 0,

                                                "ValuelistID": 0

                                    }

                        ],

                        "ThisIsConflictPD": false,

                        "ThisIsDefaultPD": false,

                        "ThisIsOwnerPD": false,

                        "UpdateType": 0,

                        "ValueList": 0,

                        "ValueListSortingType": 0,

                        "IsOwnerPropertyDef": false,

                        "SortingType": 0

            },

Still need help?