Conditional Transform Execution | Yext Hitchhikers Platform
Overview
For each transform, optionally specify a set of conditions that warrants the execution of the transform.
For each condition added, that condition must be met in order for the transform to be executed on a given row. If the condition is not met, the transform will not be executed for that row.
“Not executing a transform” means:
- For transforms that overwrite data in the specified input column(s) (e.g., Fix Capitalization), any cells that fail to meet the condition will not be transformed and the existing value will be preserved
- For transforms that create a new column (e.g., Add Column, Split Column) the value of the cell in the new column be “blank” for any rows that do not meet the specified condition
Conditions can be applied to all built-in transforms, except:
- Ignore Columns
- Filter Rows
Adding Conditions
One or more conditions can be added to a transform. If multiple conditions are specified, you must choose an operator to join the conditions. All conditions must be joined together by the same operator, either AND or OR.
For each condition, specify:
The input column header
a. This may or may not be same column as what the transform is being applied to. For example, if you are applying a transform to Fix Capitalization on the column “Page Title,” the condition can be based on the value of the column “Page Title,” or it can be based on the value of any other column of data.
The comparator (e.g., Contains, Greater Than, Equals)
The value to compare against the input value (for all comparators other than “Is Blank” nor “Is Not Blank”).
a. Within the textbox, specify a value or optionally embed the value of a cell within a column.
Examples
Merging Values
Condition: Merge Slug with Base URL to create Final URL IF Slug is not Blank
Slug | Base URL | Final URL |
---|---|---|
/product1 | https://www.mystore.com | https://www.mystore.com/product1 |
https://www.mystore.com | ||
/product2 | https://www.mystore.com | https://www.mystore.com/product2 |
Replacing Values
Condition: Replace “Onsite” with “Remote” in the column “Name” IF Work Location equals Home Address OR if Work Location is Blank
Name | Work Location | Home Address |
---|---|---|
Jenny Smith - Remote | 123 Main St., New York, NY | 123 Main St., New York, NY |
John Doe - Onsite | 222 1st. Ave, New York, NY | 15 E. 2nd St., New York, NY |
Sally Joy - Remote | New York, New York |