Spooldoc 0.7.0: lookup tables kept in Spooldoc
Lookup tables keep values Db2 for i does not have, such as the text for each payment terms code, in Spooldoc, edited in a grid or imported from CSV, and a lookup reads them with no SQL.
Spooldoc 0.7.0 is out. A lookup can now read a table kept in Spooldoc, not only Db2 for i: the text for each payment terms code in each language, the email address of whoever handles a customer group, a value for each company code. You edit the table in a grid or import it from a CSV file, with no new file on the IBM i. The agent's Excel designs can also style a whole row. Nothing breaks: the upgrade is a pull and a restart.
What changed
Lookup tables. Some values a document needs have no home in Db2 for i. Lookup tables in the sidebar keeps them in Spooldoc. A table has up to 50 columns, each text, a number or a date, and up to 10,000 rows. Edit it in a grid with a filter box, or paste cells from a spreadsheet. A cell that does not fit its column is marked, and Save waits until it is fixed. Each save raises the table's revision. When someone else saved the table since you opened it, Save says so, and Download your changes saves your grid as a CSV file to import after a reload. Lookup tables has the details.
CSV in and out. Import CSV and New table read a CSV file or
cells pasted from a spreadsheet. The delimiter is found from the first
row: a comma, a semicolon or a tab. With semicolons or tabs, numbers take
a decimal comma, as a spreadsheet saves them in Finnish or German. Before
anything changes, a preview shows each column with the type it found. A
code with a leading zero, such as 007, stays text. Download CSV
writes UTF-8 that a spreadsheet opens with ä and ö intact.
CSV files has the details.
A lookup with no SQL. In the Lookups step, set Source to Lookup
table, pick the table, and say what each key column must equal, such as
TERMS equals :paymentTerms. A Finnish template then writes
{d.pg.terms.TEXT_FI}. A key value can be a field of the page group, a
column of the row in a row lookup, or a column of an earlier lookup
that reads one row, from Db2 for i or another table. Runs, Rows and When
no row is found work as they do for Db2 for i. Test needs no server
unless an earlier lookup reads Db2 for i: it shows the table, its
revision, the rows matched and the tags to write.
A lookup that reads a table
has the details.
A change that would break a job asks first. Deleting a table, or renaming, retyping or deleting a column, names the jobs whose lookups read the table before it goes ahead. A lookup that reads a changed table needs another Test before its job can save a version. The Lookups step in the job log names each table a run read and its revision, such as "payment-terms revision 4". A run whose table was deleted stops at the Lookups step and says which lookup to change. Changing or deleting a table that jobs read has the details.
Row styles in Excel designs. When the agent designs an Excel
template, a row can now carry a style, such as a fill for a header or a
total row. A cell's own style wins over its row's, and its row's over its
column's, setting by setting: a bold cell in a row with a fill keeps the
fill. Rich text in a design can now hold a :formatN tag. Carbone then
writes the whole cell as the number, without the other text, as it does
for plain text. Excel templates by the agent
has the details.
Fixes. In an Excel template, a column's style now shows in every row. Before, a row with no cell in a styled column showed that column in the default style.
All changes are in the release notes.
Upgrading
Take a pg_dump, then pull ghcr.io/strom-capital/spooldoc:0.7.0 and
start it. The server applies the new migration. Nothing else needs you:
lookups from 0.6 read Db2 for i as before, and jobs open and run as
before.
- Lookup tables live in Spooldoc's database, not on the IBM i, so the
same
pg_dumpbacks them up. They are stored in clear text, and any signed-in user can read, change and delete them. - A lookup table needs no IBM i authority. A job whose lookups read only tables can test them with no server picked.
Tell us
Questions go to Q&A, ideas to Ideas, bugs to the issues. We most want to hear what you keep in a lookup table, and about a CSV file that did not read as you expected: its delimiter, a number or a date. Replace real library, table, host and customer names before you paste it.
The 0.7.0 release is on GitHub, and so is the announcement. Every change is in the changelog.
All changes in 0.7.0 are in the changelog.



