Skip to main content

Custom fields — create intermediate variables for your rules

Custom fields are working columns that live only inside your transformation: write to them with rules, read them in conditions — they never appear in your output file.

Written by Stéphane Jauffret

Some transformations need a scratchpad. You want to flag rows that match several different conditions, then act on all of them at once. Or compute an intermediate value once, and reuse it in three rules. You need a column to hold that temporary information — but you don't want it polluting your output file.

That's exactly what a custom field is: a working column that exists only inside your transformation.

🧮 What is a custom field?

A custom field is a column you create yourself, attached to your transformation. It behaves like any other column — you can write to it with rules, read it in conditions, and see its values in the Finalize table — with one crucial difference:

🚫 Custom fields are never exported. They exist for your transformation logic only. Your output file contains exactly the columns of your target format — nothing more.

⚙️ How to create and use one

You create a custom field directly from the Finalize screen — it appears as a new column in your table, alongside the columns of your target format.

In the Rules editor, custom fields are available everywhere a column can be used. When you pick a column — in a condition or in an action — the selector shows three tabs: Target columns, Source columns, and Custom fields. Your custom fields are listed there, each with a counter showing how many rules already use it.

🏭 Example — a multi-condition filter

You want to remove rows from your output when they match any of several unrelated conditions: products in category X, products above a certain price, products from a specific supplier. Writing that as one giant condition quickly becomes unreadable.

With a custom field, the logic stays simple:

  1. Create a custom field, for example to_remove

  2. Write one small rule per condition: IF category is X → put "1" in to_remove. IF price > 500 → put "1" in to_remove. IF supplier is Acme → put "1" in to_remove

  3. Finish with a single rule: IF to_remove = "1" → Filter out the row

Each rule stays readable, you can activate or deactivate a condition independently, and the flag column never appears in your output.

💶 Example — an intermediate calculation

You need the margin of each product for several different rules: one that flags low-margin products, one that adjusts the price, one that assigns a category. Instead of recalculating it in every rule, compute it once into a custom field margin, then use that field in the conditions of the other rules. If the calculation changes one day, you update one rule instead of three.

💡 Rule of thumb: whenever a value is needed by several rules, or a decision depends on several unrelated conditions, reach for a custom field. It plays the role a variable plays in a program.

👉 What to do next

Did this answer your question?