# Select all values of a list object

Select all values of a list object by using the [SelectListObjectAll method](https://help.qlik.com/en-US/sense-developer/May2025/Subsystems/EngineJSONAPI/Content/service-genericobject-selectlistobjectall.htm).

## Example

[](https://help.qlik.com/en-US/sense-developer/Subsystems/EngineAPI/Content/Sense_EngineAPI/DiscoveringAndAnalysing/MakeSelections/select-all-values-in-list-object.htm)

#### The first step of the example is the creation of a transient list object with one dimension, Country. The goal is to select all values of the list object.

1. Create a transient list object.

The client sends:

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

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. Select all values of the list object.

The client sends:

```
{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "SelectListObjectAll",
  "handle": 2,
  "params": [
    "/qListObjectDef",
    false
  ]
}
```

The engine returns:

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

All values are selected.

3. Get the layout of the list object.

The client sends:

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

The engine returns:

{ "jsonrpc": "2.0", "id": 3, "result": { "qLayout": { "qInfo": { "qId": "LI01", "qType": "ListObject" }, "qMeta": {}, "qSelectionInfo": {}, "qListObject": { "qStateName": "$", "qSize": { "qcx": 1, "qcy": 22 }, "qDimensionInfo": { "qFallbackTitle": "Country Label", "qApprMaxGlyphCount": 14, "qCardinal": 22, "qSortIndicator": "A", "qGroupFallbackTitles": [ "Country Label" ], "qGroupPos": 0, "qStateCounts": { "qLocked": 0, "qSelected": 22, "qOption": 0, "qDeselected": 0, "qAlternative": 0, "qExcluded": 0 }, "qTags": [ "$ascii", "$text" ], "qDimensionType": "D", "qGrouping": "N" }, "qExpressions": [], "qDataPages": [ { "qMatrix": [ [ { "qText": "United States", "qNum": "NaN", "qElemNumber": 0, "qState": "S" } ], [ { "qText": "Denmark", "qNum": "NaN", "qElemNumber": 1, "qState": "S" } ], [ { "qText": "Spain", "qNum": "NaN", "qElemNumber": 2, "qState": "S" } ], [ { "qText": "Canada", "qNum": "NaN", "qElemNumber": 3, "qState": "S" } ], [ { "qText": "Netherlands", "qNum": "NaN", "qElemNumber": 4, "qState": "S" } ] ], "qTails": [], "qArea": { "qLeft": 0, "qTop": 0, "qWidth": 1, "qHeight": 5 } } ] } } } }

All values are selected. There is a total of 22 values selected ("qSelected": 22). Only 5 values are returned in qDataPages since the number of rows specified in qInitialDataFetch of qListObjectDef is set to 5.

## Learn more

* [ListObject](https://help.qlik.com/en-US/sense-developer/May2025/Subsystems/EngineJSONAPI/Content/models-listobject.htm)