# ClearAllButThis Method

## Overloads

| [ClearAllButThis(Boolean)](https://help.qlik.com/en-US/sense-developer/November2025/Subsystems/NetSDKAPIref/Content/Qlik.Engine.Field.ClearAllButThis.htm#Qlik_Engine_Field_ClearAllButThis_System_Boolean_) |  | Maintains the selections in the current field while clearing the selections in the other fields. |
| --- | --- | --- |

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

## ClearAllButThis(Boolean)

Maintains the selections in the current field while clearing the selections in the other fields.

### Declaration

```

          public bool ClearAllButThis([QixName("qSoftLock")] bool softLock = false)
    
  
```

### Parameters

| Type | Name | Description |
| --- | --- | --- |
| System.Boolean | softLock | Set to true to ignore locks; in that case, locked fields can be selected.<br>The default value is false. |

### Returns

| Type | Description |
| --- | --- |
| System.Boolean |  |

### Implements

[IField.ClearAllButThis(Boolean)](https://help.qlik.com/en-US/sense-developer/November2025/Subsystems/NetSDKAPIref/Content/Qlik.Engine.IField.ClearAllButThis.htm#Qlik_Engine_IField_ClearAllButThis_System_Boolean_)

### Remarks

The operation is successful if qReturn is set to true.