Skip to content

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 TypeStatus
DataRequired

Output

Output TypeFormatDescription
DataTableDataset with negated Boolean(s)

Configuration Fields

Field NameDescription
ColumnsMulti-select list of Boolean columns to negate.
Include OriginalIf enabled, retains the original column(s) along with the negated version.
If disabled, only the negated column(s) are included.

Sample Input

product_namepricein_stock
Laptop500True
Camera350False
Tablet250True

Sample Configuration

FieldValue
Columnsin_stock
Include Originaltrue

Sample Output

product_namepricein_stockin_stock_negated
Laptop500TrueFalse
Camera350FalseTrue
Tablet250TrueFalse