You can download reports of individual entries in a customized Excel or Word format in Ragic with the mail merge tool.
Creating a Template for Mail Merge
Click Mail Merge under Tools in your listing page.
You can download the template created by Ragic according to your form page design, by clicking the Download button next to Sample Template.
Feel free to make modifications to customize your template in any way you want. You can choose to omit fields if you want. Repeating field values is also possible, just make sure that you are writing:
<<Field name>>
where you want to add the field values.
If the field values are in subtables, they can be written as
#Field Name#
in a row.
Note: If you have duplicate field names, and you want to mail merge the data from those fields (with the same name), you will need to change them to different names so that the system can map the fields correctly when you download the data.
In the example above, Microsoft Excel is used to edit the template, but basically, any type of spreadsheet application would work as long as you can save your spreadsheet with .xlsx format.
If you need a text document instead, you can create a template directly in a text editor application such as Microsoft Word. The field values would be formatted like the above. Save the text document with the .docx format. Please note that some elements like text boxes are not supported for variables yet.
If you need to mail merge the subtable records, it's currently only supported with Excel.
After you're done designing your template, upload this report template to your sheet by clicking on Create a template on the mail merge configuration.
You can name and save your uploaded template here (don't forget to click Upload to save).
You can upload as many report templates as you want.
Including Multiple Entries in a Page
By default, mail merge exports data as one page per entry. However, sometimes you may want to include multiple entries on one page, such as when printing a phone book, labels, business cards, etc. To do this, you can create a Word template in mail merge (Note: Excel format doesn't support including multiple entries in one page).
By adding parameters like << Field Name or ID~~1 >>, << Field Name or ID~~2 >> etc., you can configure how many entries you'd like to include in one page in the template.
After the template is saved, you can download data in the template format.
Please note that you need to upload the template to listing page and the template can only be on one page.
Download Reports Formatted with your Template
Click the Mail Merge button next to your report name when you would like to generate reports from the data in your database. This will take you to an option that displays the number of entries you would like to download with the mail merge template applied.
You can configure the number of entries to download, and choose to download them as Separated files (compressed into a zip file) or A single file (separated by tabs). Furthermore, you can also store to a file upload field if you have one of them on your sheet.
If you select to export them as separate files, the reports will then be downloaded to your computer in a .zip file. If a filter is applied to your listing page, only the filtered records will be mail merged.
This would be how a single report looks like with the template example above:
Here are other examples, with an image field included:
Excel Format
Word Format
Note: Word mail merge does not support multiple image setting for upload image field. Unlike Excel, Word does not have clear cell divisions, so there is no suitable output logic for arranging multiple images in the field.
Referenced field for file names
By clicking the gear icon next to an existing template, you can set its referenced field for file names. That referenced field's values will be the file names of your mail merged documents.
Store to File Upload Field
If you have an file upload field in your form, you can store your mail merged file there. On the mail merge window, while selecting "form page format (with single record template)" from the listing page, you can choose to store to a file upload field.
The file will be placed on your selected field and you can download the file of the respective entry from there.
Mail Merge Approval Process Records
The original format of the sample template document that you download from Ragic mainly contains the fields of the sheet and its subtable(s). If this sheet is configured with an approval process, the approval process records that are shown on the bottom right side of your sheet within Ragic would not automatically appear in the sample template document.
If you want to add them, you need to manually add instructions when you modify the Excel template document. After that, upload your customized template document so you can download reports formatted to contain the approval process records.
Parameter
Output
Note
#{{APPROVAL_STATUS}}#
Approval Status
If an assigned deputy helps approve or reject approval requests, (Deputy) wil be shown next to the approval status
In this example, we will show you how to create a mail merge template that will display approval process records on a mail merge.
First, we download the template document from the mail merge menu. It does not contain approval process records as you can see below. The fields and subtable fields are shown as below:
Here, we manually add the fields with the necessary parameters for the approval process on this spreadsheet document: Approval Status, the Approver’s Name, and the Approver’s E-mail address. After uploading, we can use this document as the new template.
With this new template, we can now have records of the approval process when we export our data through mail merge.
List of Mail Merge Parameters
Parameter
Output
<<Field ID>>
The value of a field.
<<Field Name>>
The value of a field. Case sensitive. If there is more than one field with the same field name, use <<FIELD ID>> instead.
#Field Name#
The value of a subtable field
<<$USERNAME>>
Download User Name
<<$USERID>>
Download User E-mail
<<$DATE>>
Download Date
<<$DATETIME>>
Download Date and Time
<<RECORD_LINK>>
The URL of the record
Export Selected Entries
You can use the mail merge function to only export selected entries. To do so, please select the entries you would like to export by ticking the checkbox next to the entries and then click Batch Execute.
Next, choose the format you would like to export under the Mail Merge tab.
Mail Merge For Listing Page
Similarly, you can also use the mail merge function for the listing page. If you upload your report templates on the listing page window with the corresponding field names or IDs, the data on the listing page can be exported onto your selected template. Furthermore, if you apply filter or sort on the listing page, you can also export data onto the template regarding your filter or sort. However, while on the form page, you cannot use the template that you uploaded on the listing page.
Let's take this sheet as an example, say you want to export the details of Football Stadiums in London from Ragic.
You then have to map the fields on the excel template like this first before uploading it back onto Ragic.
After clicking on Mail Merge with the template, your exported excel sheet will contain data of your entries from the listing page.
Using Formulas For Listing Page
You can also apply formulas on your mail merge template to calculate your records on the listing page. You can do this by adding the formula in the template with the following format.
<<FORMULA:(enter your formula here)>>
In the formula that you enter, you can also set up dynamic parameters so the system can automatically calculate with a selected cell value. There are two types of dynamic parameters:
{{r}}: Will automatically be replaced by the current row
{{l}}: Will automatically be replaced by the last row of the selected current column
For instance, if you want to find whether the capacities of these stadiums are greater than 20000, you can use this function on your mail merge template:
<<FORMULA:IF(D{{r}}>=20000, "yes","no")>>
On Excel, your results will additionally populate according to the formula.
On the other hand, you can use the dynamic parameter {{l}} when you want to calculate a list of data. For example, if you want to calculate the total capacity of all stadiums, you can use the following function on your mail merge template:
<<FORMULA:SUM(D4:D{{l}})>>
Note: You would still have to enter the first cell of the list of data that you want to calculate in the formula while making your template, which is D4 in this example.
While mail merging your data from Ragic, the system will also do the calculation of your formula, as you can see in the "total capacity" field.
Naming the Mail Merge File
Form Page Mail Merge
You can select to reference a certain field while naming your mail merge file. The settings can be found by clicking on the gear icon next to the mail merge template you would like to use.
While executing mail merge, if you select to save multiple records as a single file separated by tabs, the selected referenced field will apply its values on the tabs in the Excel file.
On the other hand, if you select to save multiple records as separated files (compressed into a zip file), the selected referenced field will apply its field values to the respective files’ name.
Listing Page Mail Merge
You can name your mail merge file by clicking on the gear icon next to the mail merge template you would like to use.
Access Rights
The gear icon located on the right of each template allows you to modify its access rights.
Video Tutorial
Please view the video below for a step-by-step tutorial:
Note
1. The format of mail merge is fixed, meaning that the heights of rows will not be automatically adjusted after exporting subtable entries. However, you can refer to this Excel instruction for how to adjust row height after exporting data onto Excel.
2. When restoring Previous Versions, the Mail Merge settings will also revert to their state at the time that version was saved.