Task
A supplier file stores the product name in separate brand, model, color, and size columns. The export needs one name column.
Short answer
If every field is filled, use Replace with: {brand} {model} {color} {size}. If some fields may be empty, append each part with Add to end only when that source column is Not empty, then finish with Trim spaces at edges.
How to Do It in Eofferix
- Open the settings of the output
namecolumn.
The click is on the settings icon of the output namecolumn. - If
brand,model,color, andsizeare filled in every row, add oneReplace withrule inTransformations:{brand} {model} {color} {size}.
The template takes values from brand,model,color, andsizein the same row. - Save the column settings and go to the
Exportstep.
If Some Fields May Be Empty
For incomplete rows, build name with sequential rules instead of one template. In each rule, check the source column, not the current name value.
| Order | Check | Condition | Action | Result |
|---|---|---|---|---|
| 1 | Current value | Any | Replace with | leave empty |
| 2 | brand | Not empty | Add to end | {brand} |
| 3 | model | Not empty | Add to end | {model} |
| 4 | color | Not empty | Add to end | {color} |
| 5 | size | Not empty | Add to end | {size} |
| 6 | Current value | Any | Trim spaces at edges | not used |
Put the space before the token: {brand}, {model}, {color}, {size}. Then an empty column does not add an extra separator, and the final rule removes the leading space from name.
Before / After
Before
source data| sku | brand | model | color | size |
|---|---|---|---|---|
| SKU-100 | Acme | Desk lamp | black | M |
| SKU-101 | Nord | Office chair | L | |
| SKU-102 | Shelf | white |
After
result| sku | name |
|---|---|
| SKU-100 | Acme Desk lamp black M |
| SKU-101 | Nord Office chair L |
| SKU-102 | Shelf white |