# IF statement

**URL:** <https://forums.knack.com/t/if-statement/12267>\
**Category:** Ask the Community\
**Created:** [March 22, 2022, 6:52am UTC](https://forums.knack.com/t/if-statement/12267 "2022-03-22T06:52:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![RONALD](https://avatars.discourse-cdn.com/v4/letter/r/ea666f/32.png) [@RONALD](https://forums.knack.com/u/RONALD)\
**Post date:** [March 22, 2022, 6:52am UTC](https://forums.knack.com/t/if-statement/12267/1 "2022-03-22T06:52:47Z")

</div>

Hi everyone, is there an IF function in Knack? If so, could someone kindly show an example, please?

In addition, how can I reduce the gap between these two columns?

![image](https://us1.discourse-cdn.com/flex020/uploads/knack/original/2X/b/b98a0f9dd8917b237f338c05c3e2613eeccd27ad.png)

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![CarlHolmes](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.knack.com/carlholmes/32/2814_2.png) [@CarlHolmes](https://forums.knack.com/u/CarlHolmes)\
**Post date:** [March 22, 2022, 9:56am UTC](https://forums.knack.com/t/if-statement/12267/2 "2022-03-22T09:56:13Z")

</div>

Hey @RONALD - check out the ternary operator in the below knowledge base article:

> **[Equations](https://learn.knack.com/article/nsrud4si6l-equations#conditional_equations)**
>
> What is an Equation? . Equation fields work by combining field values, numbers, and other mathematical functions to create an equation that will be calculated for each record. They are a type of a fi…

You can set the column width in column properties section.

In the builder, navigate to the page, click on the column heading to reveal the properties panel and set the width to custom 50 px. The column won’t be able to go as small as 50px as the button is too wide, however, it will constrain the column to the narrowest width possible.  
I use 50px as standard on all by edit and view links.

 ![Column Width](https://us1.discourse-cdn.com/flex020/uploads/knack/original/2X/8/804de2c3aee18361064834562df2bad6d628dbca.jpeg)
