Skip to main content
Mitratech Success Center

Client Support Center

Need help? Click a product group below to select your application and get access to knowledge articles, webinars, training content, and release notes or to contact our support team.

Authorized users - log in to create a ticket, view tickets status and check your success plan details.

 

Export to Word

Introduction

Word export functionality in smart forms allows the admin to create output reports in word format by mapping fields in the smartform. Export can be done at any stage of the form workflow. In order to use this functionality, the admin must have xml editor installed. The steps are as follows:

  • Add placeholders in Word file.
  • Save the word file as an .xml file and edit using XML editor
  • Add mappings in form template
  • Example form and xml file

Add Placeholders in Word File

Placeholders are where the values have to be populated on the Word output. These placeholders are later replaced with field numbers in xml editor.

  • Open the Word file that you want to use in order to get the output.
  • Put placeholders (symbols - ^ or @) at the locations where you want the values to be populated. An example is shown below:

clipboard_e238b4d17b6e705698154dadcc430b23d.png

Please make sure that you always use symbols and not numbers. Numbers will break the xml editor in the next stage.

Save Word File as XML and Edit Placeholders

  • Save the file (or a copy of it) as an xml file.
  • In order to edit this file, xml editor will be needed. If you do not have xml installed, please find the editor here:  http://www.firstobject.com/foxe242.zip
  • If it’s the first time you are using firstobject, goto “Tools -> Preferences”, make changes as below. Then click “OK” and press “F8”. This will make the file more readable.

clipboard_e62b0433e5117849fcd109855e5304a20.png

  • In XML Editor, go to the place that you want to mark for the smart form field (using control F) and replace the symbol with ${Rnumber}.

    Eg: For the first field, replace symbol with ${R1}. Remember these numbers will be using for mapping in the next stage.

    You can see the label of the field as well (few lines above the symbol). See example below:

clipboard_eb74fcca746591a1e5a8d396112437035.png

  • Save the xml file.
  • Also, once the xml file is edited and saved, do not open it up in word again. This will break the formatting. Always open it in xml editor.

Add Mappings in the Form Template

  • Open the relevant form in form library, edit and go to workflow wizard.

  • Go to “Enable customised word format” – Yes or No. Mark it as Yes.

clipboard_e4a31a0c7fa27972b1d9b84f57ed2b4aa.png

  • Browse the XML file and save. It should appear as below:

clipboard_e2176105c4e946ee136678cb8850f30ce.png

  • Once file is uploaded, we need to add mapping records. Click on “Add Record”. The following window opens up:

clipboard_e6520f6fc02d9c193d5d2ee69198b7a5b.png

  • Add the mark number for the field (in this case, it is 1), right click on the smartform field and select the field:

clipboard_e0bc34dc7351a56c5faca15c26472ad54.png

  • Add a suitable description for future reference:

clipboard_e85060e421c35b249eef344080b8c6e68.png

  • On how condition is used when one field has multiple values.

    Eg: Field – Phase of flight has dropdown values of take-off, climb, cruise, descent etc. Hence the field remains the same and we use on how condition as shown below. On the word export file, there will be a tick mark next to the selected value.

clipboard_ed5950656322e868367d5f3a82226c2bf.png

  • The output would look like this, based on user’s selection:

clipboard_ee3d414acc781461694e79365d771042a.png

Another example:

clipboard_ef8527c3155e4a07705bacd81da9384b7.png

  • Once the mappings are done, drag “Export to word” button onto the template (if not  present already).

  • Save the template.

Appendix 1 - Example Form, XML File and Output File

Example Form.docx

Example XML.xml

Example Output.docx

Appendix 2 - How to Include Sub-Forms

Sub-Forms.docx

  • Was this article helpful?