# ClearSelections Method

## Overloads

| [ClearSelections(QDSDocumentSession, String, DocumentClearOptions)](https://help.qlik.com/en-US/qlikview-developer/September2026/Subsystems/QMSAPIref/Content/PIX.Services.V12.Api5.IQMS5.ClearSelections.htm#PIX_Services_V12_Api5_IQMS5_ClearSelections_PIX_QMSAPI_DataObjects_QDSDocumentSession_System_String_PIX_QMSAPI_DataObjects_Enums_DocumentClearOptions_) |  | Clears or unlocks the selection of the specified field. If the field is empty, all fields will be cleared/unlocked. |
| --- | --- | --- |

[](https://help.qlik.com/en-US/qlikview-developer/Subsystems/QMSAPIref/Content/PIX.Services.V12.Api5.IQMS5.ClearSelections.htm) [](https://help.qlik.com/en-US/qlikview-developer/Subsystems/QMSAPIref/Content/PIX.Services.V12.Api5.IQMS5.ClearSelections.htm)

## ClearSelections(QDSDocumentSession, String, DocumentClearOptions)

Clears or unlocks the selection of the specified field. If the field is empty, all fields will be cleared/unlocked.

### Declaration

```

          void ClearSelections(QDSDocumentSession session, string fieldName, DocumentClearOptions clearOptions)
    
  
```

### Parameters

| Type | Name | Description |
| --- | --- | --- |
| [QDSDocumentSession](https://help.qlik.com/en-US/qlikview-developer/September2026/Subsystems/QMSAPIref/Content/PIX.QMSAPI.DataObjects.QDSDocumentSession.htm) | session | The session to be used. |
| System.String | fieldName | The name of the field to clear/unlock. If empty, all fields are cleared/unlocked. |
| [DocumentClearOptions](https://help.qlik.com/en-US/qlikview-developer/September2026/Subsystems/QMSAPIref/Content/PIX.QMSAPI.DataObjects.Enums.DocumentClearOptions.htm) | clearOptions | Specifies how the fields are cleared. |

### Remarks

This method can be used when a selection has been made using the [AddSelections(QDSDocumentSession, List<FieldContent>, Boolean, Boolean, Boolean)](https://help.qlik.com/en-US/qlikview-developer/September2026/Subsystems/QMSAPIref/Content/PIX.Services.V12.Api5.IQMS5.AddSelections.htm#PIX_Services_V12_Api5_IQMS5_AddSelections_PIX_QMSAPI_DataObjects_QDSDocumentSession_System_Collections_Generic_List_PIX_QMSAPI_DataObjects_Document_FieldContent__System_Boolean_System_Boolean_System_Boolean_) method.

##### security

Requires membership of local group *QlikView Management API* and the role *Document Folder Administrator*.