# Conditional input control

By default, all users with the appropriate permissions can input data in the Qommentary Writeback tables. However, you can also disable data input for an entire input column or for individual cells with the use of Qlik Sense expressions.

There are 2 types of expressions you can apply:

| Level  | Description                                             | Example                          |
| ------ | ------------------------------------------------------- | -------------------------------- |
| Column | All cells will be **enabled** or **disabled**           | =1 (enable) or =0 (disable)      |
| Row    | Only cells which pass the condition will be **enabled** | =if('col.Status' = 'Open', 1, 0) |

Working with row-level expressions provides greater flexibility and control to apply complex conditional calculations referencing more than one input column at a time.

Examples:

`=if('col.Priority' >= 3, 1, 0)`\
Enable input only if value in **Priority** column (type=Rating) is greater or equal than 3.

`=if('col.Target' > 60 && 'col.Approved' <> 'true', 1, 0)`\
Enable input only if value in **Target** column (type=Number) is greater than 60 AND **Approved** column (type=checkbox) is not true.

`=if('col.Status' = 'Approved' OR 'col.Status' = 'Closed' 60 && 'col.Rank' < 40, 1, 0)`\
Enable input only if value in **Status** column (type=Dropdown) is Approved or Closed AND Rank column (type=Number) is less than 40.

{% hint style="info" %}
The keyword **col** allows you to access values from other input columns found on the same row at runtime.
{% endhint %}

To enable or disable data input, please follow these steps:

1\. Edit your sheet and select the Qommentary Writeback extension\
2\. Expand the *Input Columns* section and input control you wish to alter\
3\. Scroll down to the *Allow editing if* property

<div align="left"><img src="https://1677646431-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M43RhGzV8Plu0tfknia%2F-MfYEg3UdWatjs9o0rmX%2F-MfYWJ14Dnnwhc74VA_Z%2Fimage.png?alt=media&#x26;token=321b62fe-7761-4c2c-a4be-cde68cec2747" alt=""></div>

4\. Enter an expression which would return a number **1** (enabled) or **0** (disabled)

{% hint style="success" %}
The conditional edit expressions have been applied successfully
{% endhint %}

![](https://1677646431-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M43RhGzV8Plu0tfknia%2F-MfYEg3UdWatjs9o0rmX%2F-MfYbu_tBqtN65EYGqzk%2Fimage.png?alt=media\&token=39344054-50ca-43ce-b514-bb1c645049e3)
