# Update some properties of an object

Update all or a large set of the properties of an object by using the [SetProperties method](https://help.qlik.com/en-US/sense-developer/May2025/Subsystems/EngineJSONAPI/Content/service-genericobject-setproperties.htm) or the [SetFullPropertyTree method](https://help.qlik.com/en-US/sense-developer/May2025/Subsystems/EngineJSONAPI/Content/service-genericobject-setfullpropertytree.htm).

Update one or a set of properties by using the [ApplyPatches method](https://help.qlik.com/en-US/sense-developer/May2025/Subsystems/EngineJSONAPI/Content/service-genericobject-applypatches.htm).

## Example

[](https://help.qlik.com/en-US/sense-developer/Subsystems/EngineAPI/Content/Sense_EngineAPI/WorkingWithAppsAndVisualizations/SetGetProperties/update-properties.htm)

#### The goal is to update a set of properties from a list object.

A preliminary step is to create a transient list object.

The method used in this example to update the properties is [ApplyPatches method](https://help.qlik.com/en-US/sense-developer/May2025/Subsystems/EngineJSONAPI/Content/service-genericobject-applypatches.htm).

1. Create a transient list object.

The client sends:

```
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "CreateSessionObject",
  "handle": 1,
  "params": [
    {
      "qInfo": {
        "qId": "LB01",
        "qType": "ListObject"
      },
      "qListObjectDef": {
        "qStateName": "$",
        "qLibraryId": "",
        "qDef": {
          "qFieldDefs": [
            "Country"
          ],
          "qFieldLabels": [
            "Country Label"
          ],
          "qSortCriterias": [
            {
              "qSortByLoadOrder": 1
            }
          ]
        },
        "qInitialDataFetch": [
          {
            "qTop": 0,
            "qHeight": 1,
            "qLeft": 0,
            "qWidth": 1
          }
        ]
      },
      "title": "Title for LB01"
    }
  ]
}
```

The engine returns:

```
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qReturn": {
      "qType": "GenericObject",
      "qHandle": 2
    }
  },
  "change": [
    2
  ]
}
```

The list object is created and the handle is 2.

2. Update two properties from the list object.

The updated properties are persistent (qSoftPatch is set to the default value false).

The client sends:

```
{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "ApplyPatches",
  "handle": 2,
  "params": [
    [
      {
        "qPath": "/qListObjectDef/qDef/qSortCriterias/0/qSortByLoadOrder",
        "qOp": "replace",
        "qValue": "-1"
      },
      {
        "qPath": "/meta",
        "qOp": "add",
        "qValue": "{ \"data\": \"this is the data\"}"
      }
    ]
  ]
}
```

The engine returns:

```
{
  "jsonrpc": "2.0",
  "id": 2,
  "result": {},
  "change": [
    2
  ]
}
```

The property SortByLoadOrder is updated and the property meta is added.

3. Get the properties of the list object.

Since the updated properties are persistent, the [GetProperties method](https://help.qlik.com/en-US/sense-developer/May2025/Subsystems/EngineJSONAPI/Content/service-genericobject-getproperties.htm) can be used to retrieve the properties of the list object.

The client sends:

```
{
  "jsonrpc": "2.0",
  "id": 3,
  "method": "GetProperties",
  "handle": 2,
  "params": []
}
```

The engine returns:

{ "jsonrpc": "2.0", "id": 3, "result": { "qProp": { "qInfo": { "qId": "LB01", "qType": "ListObject" }, "qMetaDef": {}, "qListObjectDef": { "qStateName": "$", "qDef": { "qGrouping": "N", "qFieldDefs": [ "Country" ], "qFieldLabels": [ "Country Label" ], "qSortCriterias": [ { "qSortByLoadOrder": -1, "qExpression": {} } ], "qNumberPresentations": [] }, "qFrequencyMode": "N", "qInitialDataFetch": [ { "qLeft": 0, "qTop": 0, "qWidth": 1, "qHeight": 1 } ], "qExpressions": [] }, "title": "Title for LB01", "meta": { "data": "this is the data" } } } }

The two properties have been updated.

## Learn more

* [Set the properties of an object](https://help.qlik.com/en-US/sense-developer/May2025/Subsystems/EngineAPI/Content/Sense_EngineAPI/WorkingWithAppsAndVisualizations/SetGetProperties/set-properties.htm)
* [Remove some properties](https://help.qlik.com/en-US/sense-developer/May2025/Subsystems/EngineAPI/Content/Sense_EngineAPI/WorkingWithAppsAndVisualizations/SetGetProperties/remove-properties.htm)
* [Add some properties to an object](https://help.qlik.com/en-US/sense-developer/May2025/Subsystems/EngineAPI/Content/Sense_EngineAPI/WorkingWithAppsAndVisualizations/SetGetProperties/add-properties.htm)