# Set the properties of an object

Set the properties of a generic 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).

Information noteThe type of an object cannot be updated.

## Examples

Example 1:

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

#### The goal is to create an object and then to set new properties.

1. Create a list object ListObject01 (qId is ListObject01 ) in a sheet. The handle of the sheet is 2.

The client sends:

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

The engine returns:

```
{
  "jsonrpc": "2.0",
  "id": 2,
  "result": {
    "qReturn": {
      "qType": "GenericObject",
      "qHandle": 3
    },
    "qInfo": {
      "qId": "ListObject01",
      "qType": "ListObject"
    }
  },
  "change": [
    3
  ]
}
```

The list object is created and the handle is 3.

2. Get the properties of the list object.

The client sends:

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

The engine returns:

```
{
  "jsonrpc": "2.0",
  "id": 3,
  "result": {
    "qProp": {
      "qInfo": {
        "qId": "ListObject01",
        "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": []
      }
    }
  }
}
```

The properties of the list object are displayed.

3. Set a title for the list object.

The client sends:

```
{
  "jsonrpc": "2.0",
  "id": 4,
  "method": "SetProperties",
  "handle": 3,
  "params": [
    {
      "qInfo": {
        "qId": "ListObject01",
        "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 ListObject01"
    }
  ]
}
```

The engine returns:

{ "jsonrpc": "2.0", "id": 4, "result": {}, "change": [ 3 ] }

The list object properties have been updated.

4. Get the properties of the list object.

The client sends:

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

The engine returns:

{ "jsonrpc": "2.0", "id": 5, "result": { "qProp": { "qInfo": { "qId": "ListObject01", "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 ListObject01" } } }

The list object has the title "Title for ListObject01".

Example 2:

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

#### The goal is to create a generic object with one child and then to set new properties to both the container object and its children. Properties are set for a second child that has not been created previously.

1. Create a generic object with identifier (qId) SH01. qChildListDef is added to the object's definition in order to be able to list the children of the object. The object has for title Container (it is the dynamic property title). The type of the object is container (qType).

The client sends:

{ "jsonrpc": "2.0", "id": 1, "method": "CreateObject", "handle": 1, "params": [ { "title": "Container", "description": "Description of sheet 1", "qInfo": { "qId": "SH01", "qType": "container" }, "qChildListDef": { "qData": { "title": "/title", "description": "/description", "meta": "/meta", "order": "/order", "id": "/qInfo/qId", "type": "/qInfo/qType", "lb": "/qListObjectDef", "hc": "/qHyperCubeDef" } } } ] }

The engine returns:

{ "jsonrpc": "2.0", "id": 1, "result": { "qReturn": { "qType": "GenericObject", "qHandle": 2 }, "qInfo": { "qId": "SH01", "qType": "container" } }, "change": [ 2 ] }

The sheet is created and has the handle 2.

2. Create a first child with identifier (qId) CH01. The handle of the request is 2 because the handle of the sheet is 2. The title of the child is First child. The type of the child is Child (qType).

The client sends:

{ "jsonrpc": "2.0", "id": 2, "method": "CreateChild", "handle": 2, "params": [ { "qInfo": { "qId": "CH01", "qType": "Child" }, "qListObjectDef": { "qStateName": "$", "qLibraryId": "", "qDef": { "qFieldDefs": [ "Country" ], "qFieldLabels": [ "Country Label" ], "qSortCriterias": [ { "qSortByLoadOrder": 1 } ] }, "qInitialDataFetch": [ { "qTop": 0, "qHeight": 1, "qLeft": 0, "qWidth": 1 } ] }, "title": "First child" } ] }

The engine returns:

{ "jsonrpc": "2.0", "id": 2, "result": { "qReturn": { "qType": "GenericObject", "qHandle": 3 }, "qInfo": { "qId": "CH01", "qType": "Child" } }, "change": [ 3 ] }

The child is created and has the handle 3.

3. Get the properties of the sheet and its child.

The client sends:

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

The engine returns:

{ "jsonrpc": "2.0", "id": 3, "result": { "qPropEntry": { "qProperty": { "qInfo": { "qId": "SH01", "qType": "container" }, "qMetaDef": {}, "title": "Container", "description": "Description of sheet 1", "qChildListDef": { "qData": { "title": "/title", "description": "/description", "meta": "/meta", "order": "/order", "id": "/qInfo/qId", "type": "/qInfo/qType", "lb": "/qListObjectDef", "hc": "/qHyperCubeDef" } } }, "qChildren": [ { "qProperty": { "qInfo": { "qId": "CH01", "qType": "Child" }, "qMetaDef": {}, "qListObjectDef": { "qStateName": "$", "qDef": { "qGrouping": "N", "qFieldDefs": [ "Country" ], "qFieldLabels": [ "Country Label" ], "qSortCriterias": [ { "qSortByLoadOrder": 1, "qExpression": {} } ], "qNumberPresentations": [], "qActiveField": 0 }, "qFrequencyMode": "N", "qInitialDataFetch": [ { "qLeft": 0, "qTop": 0, "qWidth": 1, "qHeight": 1 } ], "qExpressions": [] }, "title": "First child" }, "qChildren": [] } ] } } }

The properties of the container (the sheet) and its child are returned, respectively in qProperty and in qChildren.

4. Update the properties of the container (the sheet) and its child. Set some new properties for a second child (that does not exist) with identifier (qId) CH02.

The client sends:

{ "jsonrpc": "2.0", "id": 4, "method": "SetFullPropertyTree", "handle": 2, "params": [ { "qProperty": { "title": "New title for container", "qInfo": { "qId": "SH01", "qType": "container" }, "qChildListDef": { "qData": { "title": "/title" } } }, "qChildren": [ { "qProperty": { "title": "New title for first child", "qInfo": { "qId": "CH01", "qType": "child" } }, "qChildren": [] }, { "qProperty": { "title": "Title for second child", "qInfo": { "qId": "CH02", "qType": "child" } }, "qChildren": [] } ] } ] }

The engine returns:

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

The container has a new title and a new type. The child has a new title. New properties are added for a second child.

5. Get the properties of the sheet and its children.

The client sends:

{ "jsonrpc": "2.0", "id": 5, "method": "GetFullPropertyTree", "handle": 2, "params": [] }

The engine returns:

{ "jsonrpc": "2.0", "id": 5, "result": { "qPropEntry": { "qProperty": { "qInfo": { "qId": "SH01", "qType": "container" }, "qMetaDef": {}, "title": "New title for container", "qChildListDef": { "qData": { "title": "/title" } } }, "qChildren": [ { "qProperty": { "qInfo": { "qId": "CH01", "qType": "child" }, "qMetaDef": {}, "title": "New title for first child" }, "qChildren": [] }, { "qProperty": { "qInfo": { "qId": "CH02", "qType": "child" }, "qMetaDef": {}, "title": "Title for second child" }, "qChildren": [] } ] } } }

The properties of the container (the sheet) and its children are returned, respectively in qProperty and in qChildren. The sheet has now two children CH01 and CH02.The child CH02 has been created during the call to [SetFullPropertyTree method](https://help.qlik.com/en-US/sense-developer/May2025/Subsystems/EngineJSONAPI/Content/service-genericobject-setfullpropertytree.htm).

## Learn more

* [Update some properties of an object](https://help.qlik.com/en-US/sense-developer/May2025/Subsystems/EngineAPI/Content/Sense_EngineAPI/WorkingWithAppsAndVisualizations/SetGetProperties/update-properties.htm)