# Control Flow

Special functions that control formula execution and projection behavior.

***

## IGNORE / SKIP / PASS

Skips formula execution for the current item. The target column is **not updated** — the item is left unchanged.

**Syntax:** `IGNORE()` or `SKIP()` or `PASS()`

**Use case:** Use inside `IF()` to conditionally skip updates:

```
IF({item's Status} = "Draft", IGNORE(), {item's Calculated Value})
```

If Status is "Draft", the formula does not project a value. Otherwise, it projects the calculated value.

***

## CLEAR / EMPTY

Clears or empties the target column value. Use when you want to explicitly set the column to empty.

**Syntax:** `CLEAR()` or `EMPTY()`

**Use case:**

```
IF({item's Status} = "Archived", CLEAR(), {item's Active Value})
```

If Status is "Archived", the target column is cleared. Otherwise, the active value is projected.

***

## SWITCH

Evaluates an expression and returns the result for the first matching value. Similar to Excel SWITCH.

**Syntax:** `SWITCH(expression, value1, result1, [value2, result2, ...], [default])`

**Example:**

```
SWITCH({item's Status}, "Done", "Complete", "In Progress", "Active", "Unknown")
```

**Result:** `"Complete"` if Status is "Done"; `"Active"` if "In Progress"; `"Unknown"` otherwise.

**Example: With default**

```
SWITCH({item's Priority}, 1, "High", 2, "Medium", 3, "Low", "Normal")
```

**Result:** Maps 1→High, 2→Medium, 3→Low; any other value → "Normal".

**Example: Conditional email (from recipes)**

```
SWITCH({item's Status}, "Tim", "tim@apple.com:Tim Apple", "Jeff", "jeff@amazon.com:Jeff Amazon", "")
```

**Result:** Status-specific email strings for an email column; empty string if no match.


---

# 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://formulapro.shadebridge.com/formula-pro/formula-pro-custom-functions/control-flow.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.
