Our platform can insert one document template into another document template during the document assembly.
The document being inserted goes through the complete document assembly process before being inserted into the second document, and can be as small or as large as you require.
Inserting documents into other documents is a useful way to build up a final document from a number of smaller, reusable common document blocks. It also allows you to reuse common document paragraphs and content that is shared by more than one document, for example a ‘signing block’ in a legal document.
How to use 'Insert'
To insert another document as a part of another document, we use a special 'Insert' mergefield. The mergefield is placed in the main document along with the URL of the document to be inserted, in the following format:
{ MERGEFIELD Insert \Insert "https://falcon.syntaq.com:/Falcon/Templates/gettemplate?OriginalId=8e4a406c-df36-4273-936f-b3d8189639f1&version=live" }
You can copy template links from Syntaq by clicking the 'copy link' action beside the relevant document in Document Templates, or you can also use a publicly accessible download link from a third party document storage site.
Using a Document ID - Coming Soon
In a future update, if you are using the URL of a document hosted on Syntaq, you also have the option to only use the document ID in your field, rather than the full URL. The document in the above example could also be inserted using the following syntax:
{ MERGEFIELD Insert \Insert "8e4a406c-df36-4273-936f-b3d8189639f1" }
This will make the field much cleaner and easier to deal with while editing your template.
Field Substitution
The analogue of the document template's Insert field is the form's Nested Form component. The Nested Form allows you to insert another form into your form, and also allows you to substitute field names to avoid clashes or better express the class of data being collected.
Similarly, in your template, you might have a document part which corresponds to either one of these multiple nested forms, or various consistently named groups of fields in the main form. To match the inserted document up with these groups of fields or duplicate nested forms, you will need to change the field names in the template dynamically, in much the same way as the Field Substitute.
The Syntax for this is to add a \FieldSub switch to the end of your Insert Mergefield, and add a list of substitute pairs like so:
{ MERGEFIELD Insert \Insert "8e4a406c-df36-4273-936f-b3d8189639f1" \FieldSub {"from" : "to"}, {"this" : "that"} }
This will replace any field names in the template inserted by this mergefield, that contain the strings of characters 'from' and 'this', with 'to' and 'that'.
Note that this does not only search for entire words. A substitute pair of { "one" : "two" } would change the field 'Phone_one_num' to 'Phtwo_two_num' so be careful!
Comments
0 comments
Article is closed for comments.