Library tables in rules — gull system handbook
Library → Tables in gull system: a new table, importing from Excel and reloading, the grid, the header, and how to read a table from rules and form fields.
Library tables in rules
A Library table is named data: a price list, a size range, the allowed combinations. A rule reads it by name and pulls a value out with VLOOKUP or TABLEGETVALUE.
Create a table
- New table. In Library → Tables click New table. Fill the grid by hand or paste a block from Excel with Ctrl+V.
- Import from Excel. Choose the Source (.xlsx), the Sheet and a name, then Load. The import is a copy of the sheet: when the file changes, open the table and click Reload. gull system never writes into your file.
The grid
- The Header row is the header. Row 1 is the first row under it — the same in `TABLEGETVALUE`, in a Table field and in `VLOOKUP`. The numbers on top are column positions, the numbers on the left data-row positions.
- Ribbon: Add row, Add column, Copy, Paste, Reload. Right-click: insert a row above, a column to the left, remove, clear cells.
- A table is saved with the Save button in the window header.
Saving is refused when two columns share a header or a column with data has none: "Rules would not know which one you mean".
An edited table asks on Reload: "The table was edited after loading. Reloading replaces every row with the sheet's content and the edits in gull system are lost." Either Excel is the truth or gull system is — not both.
Read a table in a rule
- Task: A value from column 3 by a value in the first column - Formula: `VLOOKUP([Width], Sizes, 3, FALSE)`
- Task: The next larger standard size - Formula: `TABLECOLUMNLOOKUP([Length], TABLESELECTCOLUMNS(Ranges, 1), TABLESELECTCOLUMNS(Ranges, 2), "", "NEAREST_LARGER")`
- Task: A cell by row and column - Formula: `TABLEGETVALUE(Prices, 2, 5)`
- Task: A field's choices from a column - Formula: the field's Items = `LISTALLDISTINCT(Prices, 1)`
- Task: Choices that depend on another field - Formula: `LISTALLCONDITIONAL(Finishes, 2, 1, "=" & [Material])`
- Task: Other columns of the row chosen in a Table field - Formula: `TABLEGETVALUE(Prices, 3, [Range])` — a Table field returns the row number
The looked-up value is compared numerically, or as text regardless of case, but spaces are not trimmed. A value not found gives `#VALUE!`; wrap it in `IFERROR(…, "")` when empty should mean "change nothing".
Where tables are not available
A script in Code mode cannot see tables yet; neither can the workflow's Condition and Value nodes. Tables are for step 3 rules, variables, form fields and name formulas.