Joget DX 8 Stable Released
The stable release for Joget DX 8 is now available, with a focus on UX and Governance.
Table of Contents |
---|
Document Generation Datalist Action is a plugin that exports form data to a Word document based on a specific template.
Plugin Available in the Bundle:
Document Generation Datalist Action
This plugin bundle is compatible with Joget DX 8.
To successfully export form data to a Word document based on the template.
Create a word document template with general fields which will determine the layout. For example, if one want to create a resume, the word template will be as shown in Figure 1.
Utilizing form field IDs as placeholders for replacing/retrieve actual data. These placeholders are represented as $(field_id), such as $(name) and $(email) etc.
For form grids, we can either print out the specific value by using ${<formGridId>[<rowNumber>].<columnFieldId>}, or printing out the entire grid using ${formGridId} while filling up the mandatory plugin configurations for it.
Figure 1: Word document template
Download Sample Template
1. Import demo app from Download Demo App or follow Create form and datalist from scratch.
1. Get the plugin jar file from https://github.com/jogetoss/document-generation-datalist-action/releases.
2. Create a new form with the desired fields using form builder.
Figure 2: Form Builder Form
3. Generate a CRUD by using Generate App option shown below:
Figure 3: Generate a Form CRUD
4. Now go to List Builder and choose the list of that form that was created earlier and drag and drop the Document Generation Datalist Action plugin element into the list as shown below:
Figure 4: Drag and Drop the Document Generation Datalist Action Plugin in the list
5. Fill in the plugin configurations based on Document Generation Datalist Action Properties.
6. Save it and whenever a form is created or edited in the CRUD, it can be downloaded using the Download Generation Datalist Action button as shown below:
Figure 5: Export the Document using Download Generation Datalist Action button
1. Now upload this Word Template (the created word template) in the App's Resource in Joget as shown below:
Figure 6: Upload Word template in the Apps's Resource
2. Now click on the plugin → plugin Configuration →Template file bring the hash variable of the resource that was uploaded previously.
Figure 7: Get the hash variable of the Resource uploaded previously
Figure 8: Plugin Configurations
Name | Description |
---|---|
Template File | Template file created at Create a word template. You can use hash variable or directly upload the Template File in the field. |
Form | Form to be exported into Word File. |
Image Pixel Dimension (Width x Height) | Header |
Image Width (pixels) | Image width to be exported to, in pixels. |
Image Height (pixels) | Image height to be exported to, in pixels. |
Form Grid Customisation | Header |
Grid Width (Big Integer) | Grid width to be exported to, in Big Integer. |
Grid Direction | Grid direction to be exported
|
Include Header | If checked, header will be included in the exported grid. |