# Switch

**Switch** controls are ideal for visually indicating mutually exclusive states - such as active/inactive, yes/no.

**Data type**: `boolean`

### Adding a Switch control

1\. Edit your sheet\
2\. Click on the **Qommentary Writeback** extension\
3\. Expand **Input Column** section\
4\. Click on **Add column**

<div align="left"><img src="https://1677646431-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M43RhGzV8Plu0tfknia%2F-MZCvqSqKXuXT2WpbY2f%2F-MZCx6ezSPuMpGDkleyH%2Fimage.png?alt=media&#x26;token=c8a0c47a-fd65-447f-9bcf-fb1394cce274" alt=""></div>

5\. Select **Switch** from the dropdown menu

<div align="left"><img src="https://1677646431-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M43RhGzV8Plu0tfknia%2F-MZDhInK3pJzvc2Nwm5P%2F-MZDiFYCGIzvHYDVG34q%2Fimage.png?alt=media&#x26;token=63f049db-3be1-4ed7-98ec-183360279a01" alt=""></div>

6\. Add a **label** to be displayed as a column header

<div align="left"><img src="https://1677646431-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M43RhGzV8Plu0tfknia%2F-MZDhInK3pJzvc2Nwm5P%2F-MZDiTex1BRtwvim-fnT%2Fimage.png?alt=media&#x26;token=9d3a2f52-3986-4462-be07-90b646b10a02" alt=""></div>

7\. Add a **field** name

<div align="left"><img src="https://1677646431-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M43RhGzV8Plu0tfknia%2F-MZDhInK3pJzvc2Nwm5P%2F-MZDidpKU8pTzt0k496M%2Fimage.png?alt=media&#x26;token=ce5a44e7-f154-4ad7-bbd0-6b964a3141e5" alt=""></div>

{% hint style="danger" %}
If database is selected as data connection, then field name **must map** to destination table column name.
{% endhint %}

{% hint style="warning" %}
Field name cannot contain spaces.
{% endhint %}

8\. Click on **Done**

**Switch** input column can now be updated and saved.

![](https://1677646431-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M43RhGzV8Plu0tfknia%2F-MZAuorqwnWL2kQP01CF%2F-MZB-AumeWhtdWFOGl8A%2Fimage.png?alt=media\&token=501e538d-3348-43cc-a50e-7e3173f4c6f3)

### Customizing column width

Input columns have a set width by default. If you wish to change the column width, please follow these steps:

1\. Edit your sheet\
2\. Click on the **Qommentary Writeback** extension\
3\. Expand **Input Column** section\
4\. Locate the **Column width** property

<div align="left"><img src="https://1677646431-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M43RhGzV8Plu0tfknia%2F-MZDJXBPujnEslrwotv6%2F-MZDMKp4nLaBy5IYUHON%2Fimage.png?alt=media&#x26;token=fc4479d8-ee70-43c1-976e-9abc55bedcad" alt=""></div>

5\. Drag the slider to adjust the column width

<div align="left"><img src="https://1677646431-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M43RhGzV8Plu0tfknia%2F-MZ90EIKtNZ2VjrnYFQ-%2F-MZAAMpAXfEWAmU2bfz4%2Fimage.png?alt=media&#x26;token=bb9af150-f97d-49bc-a18f-ca1faf5dd7b2" alt=""></div>

4\. Alternatively, you can enter a specific value in the **Custom column width** field

<div align="left"><img src="https://1677646431-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M43RhGzV8Plu0tfknia%2F-MZ90EIKtNZ2VjrnYFQ-%2F-MZAAZ3qrMZoe0U7VUxs%2Fimage.png?alt=media&#x26;token=be40bae3-ecea-4aef-acae-9db423ae5c82" alt=""></div>
