How to update a property with multi checks using JSON?


#1

Hello,

I wanted to add values to a multi check box using api . I am unable to write the JSON for the same . Please help !


#2

Hi @rishabh_sethia,

To update an enumeration field you need to include all of the existing options, plus the new options you want to append.

for example if your existing fields are:

"options": [
   {
      "hidden": false,
      "description": null,
      "value": "option 1",
      "readOnly": false,
      "doubleData": 0,
      "label": "option 1",
      "displayOrder": 0
    },
    {
      "hidden": false,
      "description": null,
      "value": "option 2",
      "readOnly": false,
      "doubleData": 0,
      "label": "option 2",
      "displayOrder": 1
    }]

you’d need to PUT the following to append new enumeration values:

"options": [
    {
      "hidden": false,
      "description": null,
      "value": "option 1",
      "readOnly": false,
      "doubleData": 0,
      "label": "option 1",
      "displayOrder": 0
    },
    {
      "hidden": false,
      "description": null,
      "value": "option 2",
      "readOnly": false,
      "doubleData": 0,
      "label": "option 2",
      "displayOrder": 1
    },
    {
      "hidden": false,
      "description": null,
      "value": "option 3",
      "readOnly": false,
      "doubleData": 0,
      "label": "option 3",
      "displayOrder": 2
    },
    {
      "hidden": false,
      "description": null,
      "value": "option 4",
      "readOnly": false,
      "doubleData": 0,
      "label": "option 4",
      "displayOrder": 3
    }
  ]