September 25, 2020

You can create discussions for each of the subfields present inside “Group,” “Modular Blocks,” or “Global” fields. However, when you mark the parent field as multiple, the discussion fails to recognize which subfield was linked to it.

To identify each instance of a field marked as “Multiple”, we send the _metadata key in the response of GET requests for draft entries. This key contains the unique ID assigned to each field instance.

This is useful in cases where “Group,” “Modular Blocks,” or “Global” fields have comments added to multiple instances of their subfields.

For example, consider an entry named “Demo Entry” that consists of the “Employee Address” Global field. If the Global field has been marked as “Multiple”, then the following response is returned for a “Get entry” API request:

{
    "entries": [
        {
            "_version": 6,
            "locale": "en-us",
            "uid": "blt60e06920a98836a6",
            "ACL": {},
            "_in_progress": false,
            "created_at": "2020-04-08T03:05:37.254Z",
            "created_by": "blt42e55757d70d5f81026a2b9f",
            "employee_address": [
                {
                    "rich_text_editor": "Sample address",
                    "boolean": true,
                    "_metadata": {
                        "uid": "csc8c89feb26118172"
                    }
                },
                {
                    "rich_text_editor": "<p>Two are there.</p>",
                    "boolean": true,
                    "_metadata": {
                        "uid": "cs1d57fbd82e175ba7"
                    }
                }
            ],
            "title": "Demo Entry",
            "updated_at": "2020-10-21T13:34:52.718Z",
            "updated_by": "blt6563a9b067fc1bc9",
            "url": "/demo",
            "publish_details": [
                {
                    "environment": "bltfd8970c7bd9cb0cb",
                    "locale": "en-us",
                    "time": "2020-10-21T13:40:35.127Z",
                    "user": "blt6563a9b067fc1bc9",
                    "version": 6
                }
            ]
        }
    ]
}

Was this article helpful?

Thanks for your feedbackSmile-icon

top-arrow