OX Text field automation

OX Text allows the user to automatically fill user fields in ODF text documents when creating a document from a template.

This can be achieved via regular urls passed to the browser, so that the process can also be triggered from outside, e.g. from a desktop application.

The data can easily be encoded in the url, but as the length of urls has limitations, you can also specify a cvs file in OX Drive.

The document template

The source template or regular document needs to include fields of type Mail merge field.

Note: In Open Office the field type is called Mail merge field. Unfortunately you can’t specify the name of the field, as you can only select items from an existing database. So you need to add fields with the desired name to the database that comes with Open Office. Alternatively, use MergeField in Microsoft Word and specify the name, but don’t forget to save as ODF.

The conversion process

To create a new document based on an existing document or template, with updating the content of the fields, you have different choices to pass the field data to OX Text.

The conversion URL

The general syntax for all the different ways to perform a conversion is:

JSON notation

FIELDNAME<n> is the name of the field, FIELDVALUE<n> is the text that you want to place into the field. Add as many name/value pairs as you want, separated by comma.

Field values via CVS File

The values can also be read from a cvs file located in OX Drive. This avoids exceeding the maximum url length.

CSV notation

The csv file can use tabs, semicolons or commas as a separator. All fields containing commas or semicolons must be placed inside quotes. The first line in the csv file contains the field names, the second line contains the field values.