The DOCX data view requires the users to have a template for the information to be rendered. Users can create their own DOCX file to return data in their own customizable way. The user could use MS Word or another DOCX editing software.
Syntax used in the Doc X template builder is inspired by Mustache. Users add {#results} at the top of the document and at the end of the document the user will add {/results}. This creates an opening and closing loop for the data. Users will also use the curly braces when they need to reference data from a form on the database. Example below is “name” right under the “results” opening loop. The “name” tag is referenced from the Registration Form in the Registration repository.
The Doc X forms can also return data from a child reference. The user must start another opening loop with the name of the form and the child reference in curly braces EX. {#Consent Form-phonenum}. This will be followed by the tag the user wants to return from the form. Ex [name].
In the Shore application if the correct tags are not selected they will not return any data. for example if the child reference from the Consent Form “phonenum” was in the Doc X template but not selected as a tag in Shore then the data will return undefined.
Formatting in the document can be passed on such as font type, font size, text colour, and alignment. For example “homephone” in the picture below has had its text highlighted in Yellow.
This is an example of the information selected in Shore and returned in a DOCX form using that data. It shows the name of the user from the registration form just above the table. The Consent Form has the tags name, home phone number, and city returned.