# ClearAllButThis method

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

## Parameters

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

## Returns

| Name | Description | Type |
| --- | --- | --- |
| qReturn | true/false<br><br>Information noteThe operation is successful if qReturn is set to true. | Boolean |

## See also

[Clear the selections in all fields except the current field](https://help.qlik.com/en-US/sense-developer/November2025/csh/engineapi/clear-selections-in-all-fields-except-current-field)