FAQ - CoMod

Tip: Loops in the raw text: NEXT DEF instead of Multi-CSV

This time a tip for advanced RTF users using CIB merge with Multi-CSV files. Because you process a large number of dynamic tables, in the middle of an RTF text, you can assign a new CSV file to an existing alias name or else define a new alias. To do this, use the following statement in the RTF document {NEXT "DEF:Alias name; <csv> "} </csv>, For example {NEXT "DEF:Person;X:\\Data\\Personnel.csv"} . You can then of course dynamically append the CSV file by a REF statement again. That might then for instance have the following appearance:
{NEXT "DEF:Personnel;{REF filename}"}, or with one additional level of indirection:
{NEXT "DEF:Personnel;{REF data path} Personnel_{REF DepartmentNumber}.csv"}
The major advantage here is: The individual CSV files do not yet have to be known when the Multi-CSV file is being written. The assignment in the document is even more flexible and increases the dynamics by one further level. You may even be able to do without the Multi-CSV file completely. For those people who reached the limit in the number of open files accepted by CIB merge: As in the above personnel file which depends on the department number, always use the same alias. In this way, only one file will ever be opened. (That naturally only makes sense if the CSV files have the same purpose.)

Category: CIB merge
« Go back