Name folders and files by formula — gull system handbook
Folder and file name formulas in an output structure: the Formula orb, inputs and variables in a name, the order number, forbidden characters, an empty formula, two outputs colliding.
Name folders and files by formula
A folder's and a file's name can be a formula in the rule language. The order number comes into it from the workflow's Value node.
Procedure
- In the main menu Output documentation open the structure and select a folder or document.
- In Properties click the orb next to Name — the row switches to a rule and the Formula group appears.
- Write the formula: `[Order number] & " - " & [Customer]`. The same language as in step 3; inputs, variables and tables are available.
- The Preview with default values column shows the result. "⚠ formula error" means the formula does not pass.
Useful formulas
- Goal: a folder per order - Formula: `[Order number]`
- Goal: a folder per customer with the orders inside - Formula: folder `[Customer]`, sub-folder `[Order number]`
- Goal: a file with the dimensions in its name - Formula: `"Frame " & [Length] & "x" & [Width]`
- Goal: a fixed-length number - Formula: `TEXT([Sequence], "0000")`
- Goal: a name without characters a folder cannot take - Formula: `SUBSTITUTE([Customer], "/", "-")`
Where the order number comes from
The order number is not a built-in value — it is an input filled by the workflow's Value node from its counter, in a shape such as `2026-0042`. Once you have it, you use it in formulas like any other input. The setup is in Number the orders.
What happens on an order
- Two outputs that resolve to the same file are both skipped: "the second would overwrite the first".
- An output that would overwrite the model itself is not saved: "The output would overwrite the model itself".
- A name with a character Windows forbids, or a reserved name (CON, NUL, …), is not saved and the Log says so.
A file name inside a structure has no extension — the format supplies it. One document in two formats therefore has one name and two extensions.