# If...Then Column

<figure><img src="/files/J2Ir0wLuqPd6eIK3u9lT" alt=""><figcaption></figcaption></figure>

## Overview

The If...Then Node allows you to create or modify columns in your dataset based on conditional expressions. The node applies a value or expression to a new or existing column depending on whether the specified conditions are met.

<figure><img src="/files/ZBjcDbTGNlZuWbNP6ffV" alt=""><figcaption></figcaption></figure>

## **Settings**

#### **If**

The "If" property allows you to define the condition for the If..Then Node. There are two options for creating conditions:

1. Predefined Operators. You can easily set up conditions based on column values and comparison operators using predefined operators. Follow these steps to create a condition:
   1. Select the column you want to use as a basis for the condition.
   2. Choose a comparison operator (e.g., equal, contains, etc) depending on the column's data type.
   3. Enter a value to compare with the selected column's values.
2. Custom Formula. To use a custom formula, enable the "Custom Formula" toggle. With this option, you can define any condition that returns a boolean value (true or false).

#### **Then set a value to**

If the condition in the "If" property is met (returns true), the value or expression defined in the "Then Set Value To" property will be applied to the new or existing column.

#### **+ Add Condition (Else If)**

You can add an "Else If" block by clicking the "+Add Condition" button. This block will be evaluated if the previous condition(s) are not met (return false). If the "Else If" condition is met (returns true), its corresponding value or expression will be applied to the new or existing column.

#### **Otherwise (if all conditions are failed)**

If all conditions in the "If" and "Else If" blocks fail (return false), the value or expression specified in the "Otherwise" property will be applied to the new or existing column.

#### **Column Name**

The "Column Name" property allows you to specify the name for the new or existing column. By default, the new column will be added to the dataset. If you want to overwrite an existing column instead, enable the "Overwrite" toggle and select the column you want to overwrite from the list.

## **Preview**

The new or modified column will appear in the dataset, showing the values or expressions applied based on the conditions you defined


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.tabula.io/data-flows/tools-nodes/columns-operations/if...then-column.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
