# selectionState method

Information note**STABLE.**   
  
This API is reliable and breaking changes are unlikely.

qlik.app.selectionState(state)

Creates a [QSelectionState](https://help.qlik.com/en-US/sense-developer/November2025/Subsystems/APIs/Content/Sense_ClientAPIs/CapabilityAPIs/SelectionAPI/QSelectionState.htm) object that encapsulates the selection state. Entry point to the [Selection API](https://help.qlik.com/en-US/sense-developer/November2025/Subsystems/APIs/Content/Sense_ClientAPIs/CapabilityAPIs/SelectionAPI/qlik-selectionState-interface.htm).

## Version history

Version history

| Version state | Details |
| --- | --- |
| Introduced | 2.2 |

## Parameters

### state

Type: String

Optional.

Sets the state.

Default is $.

## Returns

A selection state object for the selection state of type [QSelectionState](https://help.qlik.com/en-US/sense-developer/November2025/Subsystems/APIs/Content/Sense_ClientAPIs/CapabilityAPIs/SelectionAPI/QSelectionState.htm).