# SortByState Property

## Overloads

| [SortByState](https://help.qlik.com/en-US/sense-developer/May2026/Subsystems/NetSDKAPIref/Content/Qlik.Engine.ISortCriteria.SortByState.htm#Qlik_Engine_ISortCriteria_SortByState) |  | Sorts the field values according to their logical state (selected, optional, alternative or excluded).<br><br>JSON property name: qSortByState |
| --- | --- | --- |

[](https://help.qlik.com/en-US/sense-developer/Subsystems/NetSDKAPIref/Content/Qlik.Engine.ISortCriteria.SortByState.htm) [](https://help.qlik.com/en-US/sense-developer/Subsystems/NetSDKAPIref/Content/Qlik.Engine.ISortCriteria.SortByState.htm)

## SortByState

Sorts the field values according to their logical state (selected, optional, alternative or excluded).

JSON property name: qSortByState

### Declaration

```

          SortDirection SortByState { get; set; }
    
  
```

### Property Value

| Type | Description |
| --- | --- |
| [SortDirection](https://help.qlik.com/en-US/sense-developer/May2026/Subsystems/NetSDKAPIref/Content/Qlik.Engine.SortDirection.htm) |  |