General Purpose Export Event

The General Purpose Export Event provides a means for simple integration with external systems. It provides the ability to export data in a variety of standard formats using standard communication channels such as Email or FTP.

Events

You can choose from three events:

  • On Form Receipt, exports the form immediately as soon as it is received
  • On Website Confirmation, exports the form when the form has been confirmed correct
  • On Export, exports the form when someone clicks the export button on the form

It is possible to choose one or more of these events to suit your requirements.

Actions

Once you have chosen your event(s) you can choose which action you’d like to perform.

Email the form

The email action allows you to send an attachment containing the form data to the specified email address. You can also select the format of the attachments you’d like to send with the mail. The available options are as follows:

  • Recipients, a list of the addresses you’d like to send the mail to. Add an email address on each line.
  • Attachment Name, allows you to specify the name of the attachment. See below for information on naming files and attachments.
  • Subject, allows you to customise the subject line of the email.

Save the form in this location

The save action allows you to store the form directly into a folder. This can be a folder on the same machine as OpenForms (e.g. using a location such as C:ExportFolder) or it can be stored on to a network share using (e.g. using a location such as \MachineNameShareName).

Tip: When storing files on a network share it is important to know the identity in which OpenForms is trying to connect to that share. By default OpenForms runs using a local machine account which will not allow access to network shares on a Windows Domain, for instance. You can specify an alternate account to use when connecting to such shares.

  • Location, is the folder in which you want to store the forms in.
  • Username, allows you to change the default username that OpenForms will use to connect to the above location. You can specify a domain using the format DomainUsername.
  • Password, is the password associated with the account used to connect to the above location.
  • File Name, allows you to specify the name of the file to be stored. See below for information on naming files and attachments.

FTP the form

The FTP action allows you to connect to an FTP server and transfer the forms to a location on that server.

Tip: The FTP protocol is non-transactional and can leave incomplete files on the destination if a transfer is interrupted.

  • Server, is the hostname or IP address of the FTP server.
  • Port, is the port number of the FTP service. Leave this blank to use default port 21.
  • Username, is the username of the FTP account.
  • Password, is the password of the FTP account.
  • Folder, is location on the FTP server where you would like to store the forms. This path can be relative to the home directory (e.g. ../exports/) or can be an absolute path (e.g. /home/ftp/exports).
  • File Name, allows you to specify the name of the file to be stored. See below for information on naming files and attachments.

SFTP the form

The SFTP action allows you to connect to an SFTP server and transfer the forms to a location on that server. SFTP is FTP running over an SSH tunnel and shouldn’t be confused with FTPS which is not currently supported.

Tip: The SFTP protocol is non-transactional and can leave incomplete files on the destination if a transfer is interrupted.

  • Server, is the hostname or IP address of the FTP server.
  • Port, is the port number of the FTP service. Leave this blank to use default port 21.
  • Username, is the username of the FTP account.
  • Password, is the password of the FTP account.
  • Folder, is the location on the FTP server where you would like to store the forms. This path can be relative to the home directory (e.g. ../exports/) or can be an absolute path (e.g. /home/ftp/exports).
  • File Name, allows you to specify the name of the file to be stored. See below for information on naming files and attachments.

Send the form via HTTP POST

The HTTP POST action allows you to send your forms to a web server. HTTP POST offers the ability to perform transactional processing eliminating the issues associated with FTP and SFTP transfers. However, it may be necessary to build a bespoke solution in this case in order to transfer the data in this way. File attachments are sent using a standard HTTP multipart/form-data file post.

  • URL, the address to post the files to. The URL should be an absolute url (e.g. http://server/postfileshere.ashx).
  • File Name, allows you to specify the name of the file to be posted. See below for information on naming files and attachments.

Set the form status

The set form status action allows you to change the status of the form when an export has been processed. You can choose the status from the list provided.

Tip: If you choose “Exported” from the list you can show which forms have been exported in your search pages.

Error Handling

If there are any problems when trying to export a form then by default OpenForms will record the failure and will not try the export again. The Error Handling section allows you to specify an alternative course of action.

Details of any export problems are logged in the System Administration area of the site. This contains detailed diagnostic information which can help find the cause of the problem. If you are unable to resolve the problem yourself then please provide this information to Magicomm Support.

Retry

This allows you to retry the export a number of times before failing. You can specify the interval between retries and the number of times to retry.

Tip: The retry option is useful for overcoming temporary networking connectivity problems.

Send Email

You can inform someone via email that an export has failed.

  • Include Data?, allows you to include the original attachments and files that were to be exported and send them to the recipients.
  • Recipients, is a list of email addresses to contact when the export has failed. For multiple addresses, add one address per line.

Set the form status

You can change the status of a form when the export has failed using this option. Select the status required from the list.

Tip: You can use this option to reset a form back to the Completed status when an export fails. This status will be visible in the form search page.

Naming Files and Attachments

It is possible to name any files and attachments in the actions available above. Files can be named using a fixed name (e.g. Test.pdf) or they can be named using dynamic parameters, such as the name of the person who submitted the form.

Dynamic parameters are identified by using the @@ characters in the file name. The following parameters are supported:

Parameter Name Meaning
@@FormID@@ A unique 36-character identifier for the form.
@@VersionID@@ A unique 36-character identifier for the version of the form. This changes when the form is updated or saved.
@@GroupID@@ A unique 36-character identifier for the form group. All continuation sheets for a form will give the same identifier as the form itself.
@@GroupItem@@ A numeric value identifying the position of the continuation sheet or form within the group.
@@FileIndex@@ A numeric value identifying which export format this is. For example, if you were to select CSV, PNG and PDF as export formats this parameter would be 0, 1 and 2 respectively.
@@ExportCounter@@ A numeric value containing a count of the number of times this form has been exported.
@@FormTypeName@@ The name of the form design being exported (e.g. Application Form).
@@FormTypeID@@ A unique 36-character identifier for the form design.
@@FormTypeVersionID@@ A unique 36-character identifier for the version of the form design. For example, revision 5 and 6 of and Application Form would generate different identifiers.
@@Extension@@ The correct extension to use for the selected export formats. For example, if you were to select CSV, PNG and PDF as export formats this parameter would be .csv, .png and .pdf respectively.
@@OwnerName@@ The name of the person who originally completed the form.
@@Field:<Field Name>@@ The value of field "<Field Name>" captured on the associated form.