---
title: Negate boolean
description: Convert Boolean values in specified columns to their logical negation (True to False, False to True).
category: Data Transformation
tags: [boolean, transform, negate, logic, true/false]
---

# Negate boolean

## Description

The **Negate Boolean** activity transforms Boolean values (`True` or `False`) in selected columns by converting them to their logical opposite.

You can choose to apply this transformation to one or more columns, and optionally retain the original columns in the output.

Use this activity to:

- Reverse logic conditions in a dataset (e.g., convert "active" to "inactive")
- Create negated flags for use in filtering or business logic
- Prepare conditional fields for downstream processing

> **Use case**:  
> A dataset contains a field `in_stock` that indicates product availability. Use this activity to add a column showing products that are **not in stock** for filtering purposes.

## Input

| Input Type | Status   |
| ---------- | -------- |
| **Data**   | Required |

## Output

| Output Type | Format | Description                     |
| ----------- | ------ | ------------------------------- |
| **Data**    | Table  | Dataset with negated Boolean(s) |

## Configuration Fields

| Field Name           | Description                                                                                                                           |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| **Columns**          | Multi-select list of Boolean columns to negate.                                                                                       |
| **Include Original** | If enabled, retains the original column(s) along with the negated version. <br> If disabled, only the negated column(s) are included. |

## Sample Input

| product_name | price | in_stock |
| ------------ | ----- | -------- |
| Laptop       | 500   | True     |
| Camera       | 350   | False    |
| Tablet       | 250   | True     |

## Sample Configuration

| Field              | Value      |
| ------------------ | ---------- |
| `Columns`          | `in_stock` |
| `Include Original` | `true`     |

## Sample Output

| product_name | price | in_stock | in_stock_negated |
| ------------ | ----- | -------- | ---------------- |
| Laptop       | 500   | True     | False            |
| Camera       | 350   | False    | True             |
| Tablet       | 250   | True     | False            |
