DocumentBurster™ variables are pieces of information from the input report, evaluated and processed individually for each output report.
Variables can be used to define dynamic configurations as well as data to be included in the delivery of documents. For example, using an email message template together with variables it is possible to define a personalized email subject/message for each individual recipient.
Variables can be used to define custom dynamic values for the following configurations
Using variables, the values of the above configurations can be dynamically populated at run-time with information coming from the report which is being burst.
While it is possible to define static values for the output folders, it is not advisable. In order to avoid the output reports to get overridden from one burst session to another, with the help of variables, it is better to define dynamic time-stamp based output folder configurations.
Following are few situations in which variables will help
Using variables, with unique time-stamp based values generated at run-time, it is possible to overcome the above described problems by defining unique output folder names per each different burst session.
Output Folder, Backup Folder and Quarantine Folder configurations are all defined using the same pattern $input_document_name$/$now; format="yyyy.MM.dd_HH.mm.ss"$
When bursting the input sample document
Payslips.pdf,
by default, the output files are being generated in a folder
similar
with
Payslips.pdf/2010.10.28_19.13.13
-
$input_document_name$/$now;
format="yyyy.MM.dd_HH.mm.ss"$.
Built-In vs. User-Defined Variables
DocumentBurster™ has two types of variables
Built-In Variables
User-Defined Variables
Built-in variables can be the name of the report to burst, the date (in various formats) when the bursting is happening or the current burst token.
Following built-in variables are available to be used within DocumentBurster™
Windows doesn't allow to use the character : when defining folder and file names.
Using built-in variables it is possible to build an advanced foldering and archiving solution for the output reports.
Following different foldering options are possible. Combinations of the following are also possible
Generate one different output folder per each input report
Generate one different output folder per each different burst token
Date related options - generate one output folder per year, financial quarter, month, week in month, day in week and up to the level of hours, minutes and seconds.
DocumentBurster™ is coming with the following default settings
Burst File Name - $burst_token$.$input_document_extension$
When bursting the
samples/Payslips.pdf
report following three
files are being generated. The three email
addresses are the burst tokens and
pdf
is the input
document extension.
User defined variables can be any text from the report which is being burst or distributed.
User variables might be used for sending emails with a personalized subject and a personalized message text or for generating dynamic file names and folder names for the output burst reports.
DocumentBurster™ has support for up to 10 (ten) user defined variables $var0$, $var1$, $var2$, $var3$, $var4$, $var5$, $var6$, $var7$, $var8$ and $var9$. While the variable names are not impressive they are for sure handy to use.
The values for the user defined variables are being populated with text content from the report which is being burst. Usually the variables will have different values for each different burst token (or for each different recipient).
In order to populate the user defined variables with values, DocumentBurster™ engine is looking inside the report for patterns like the following
<0> any text which should be assigned as a value to the first variable </0> or
<1> any text which should be assigned as a value to the second variable </1>
DocumentBurster™ engine supports up to 10 (ten) different variables, so the last variable will look like <9> any text which should be assigned as a value to the 10th variable </9>.
User defined variables can be used to dynamically generate any of the following Burst File Name, Output Folder, Backup Folder, Quarantine Folder, Upload(FTP, File Share, etc.) commands and URLs, Email To, CC and BCC fields, Email Subject, Email Message Text, From Name, From Email Address, Host, User Name, User Password and Email Server Port.
With the default settings, DocumentBurster™ is generating the output file names using the following configuration
Burst File Name
-
$burst_token$.$input_document_extension$
where
$burst_token$
is the system built-in variable used to burst
the separate files and
$input_document_extension$
is the input file
extension (i.e.
pdf, xls or xlsx).
Requirement
For example, a requirement might be to generate the output file names (Burst File Name) using the following pattern
Customer name-Invoice number-Invoice date.pdf
The requirement can be achieved with the help of user defined
variables.
Please check
samples/Invoices-Oct.pdf
sample report to see that
Invoice number
field is configured as burst token and
Customer name
and
Invoice date
fields are mapped to
$var1$
and
$var0$
user variables.
Burst File Name
will be defined as
$var1$-$burst_token$-$var0$.pdf
$burst token$, $var0$ and $var1$ variables will be populated at run-time with values fetched from each separate report.
Alpha Electric-0011-Oct 10, 2011.pdf
Using the previous configuration, bursting
samples/Invoices-Oct.pdf
will generate
the following four distinct files
Use a white font color for the start and the end tags of the variables, (e.g. <0> and </0>) so that the visual appearance and the layout of the report will not be affected.
Before going to production, it is advisable to practice the use of variables on few sample reports. This is to avoid any unpleasant situation of sending wrong data to clients or customers.
While the concept and the usage for the user defined variables are the same with the PDF reports, Excel user defined variables are defined like the following example