> For the complete documentation index, see [llms.txt](https://docs.tomat.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tomat.ai/data-transformation/formulas/misc-functions/if.md).

# If

Get a value conditionally (single condition)

```mathematica
If(true, 1, 0) → 1
If(false,1, 0) → 0
```

#### Inputs

`If(condition, ifTrue, ifFalse)`

* `condition` - An expression that outputs true or false
* `ifTrue` - A value to output if the `condition` is true
* `ifFalse` - A value to output if the `condition` is false
