> For the complete documentation index, see [llms.txt](https://knowledgebase.qommentary.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://knowledgebase.qommentary.com/qommentary-writeback/custom-data/adding-input-columns/switch.md).

# 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="/files/-MZCx6ezSPuMpGDkleyH" alt=""></div>

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

<div align="left"><img src="/files/-MZDiFYCGIzvHYDVG34q" alt=""></div>

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

<div align="left"><img src="/files/-MZDiTex1BRtwvim-fnT" alt=""></div>

7\. Add a **field** name

<div align="left"><img src="/files/-MZDidpKU8pTzt0k496M" 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.

![](/files/-MZB-AumeWhtdWFOGl8A)

### 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="/files/-MZDMKp4nLaBy5IYUHON" alt=""></div>

5\. Drag the slider to adjust the column width

<div align="left"><img src="/files/-MZAAMpAXfEWAmU2bfz4" alt=""></div>

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

<div align="left"><img src="/files/-MZAAZ3qrMZoe0U7VUxs" alt=""></div>
