Removes the specified substitution table from memory. It does not affect the physical file stored on disk, only the representation of the table in the memory.
A substitution table is kept in memory until EraseSubst is called for that table. This means StreamServer performance will be affected if several tables are created in a job, and if the tables are never removed from memory during the job using the
EraseSubst function. For example, if you use variables in the table names, you must make sure there are a limited number of tables in the memory. In this case you must call
EraseSubst for each table after it is used.
If you use ClearSubst, and then access the substitution table with for example
GetSubst, an empty string will be returned. If you access the table after using
EraseSubst, the table will be re-read from disk, and a value will be returned.
In this example, the ID of the previous document is copied to the current document, and the substitution table of the previous document is removed from memory and from disk. The variable
$documentID is defined in the Event. Its value comes from the input data. The variable
$prevDocumentID is the ID of the previous document.