Changes

Jump to: navigation, search

Including XML on an MS Word Merge Document

24 bytes added, 13:16, 3 June 2016
no edit summary
This article explains how to use the data stored within a SmartSimple [[Custom Field Type: Special - XML Data|XML field]] on a [[Word Merge]] document.
Word Merges can either draw in a single value from an [[XML ]] "node" or the XML data can be displayed as a table.
==Syntax==
For single values from an XML node use the following syntax in the "Values" section of the [[Custom Field Type: Special - MS Word Merge|Word Merge custom field]]:
:''Mergefield''=@xml.''fieldname.sectionname.nodename''(''childnodename''.nodevalue)@;
:'''Example:''' project_budget=@xml.Submission Budget.Total-Expenses.total-exp.currency(total-expenses.nodevalue)@;
To display data in a table (dynamic number of rows) use the same syntax as used on a web page view ([[Custom_Field_TypeCustom Field Type:_Special_-_XML_DataSpecial – XML Data]])
and delimit the cells using pipes ("|"). Note that there is a pipe ("|") at the beginning and end of the row.
:''table_x''=@xml.''fieldname.sectionname.nodename''[#|~''childnodename.nodevalue~|~childnodename.nodevalue''~|#]@;
:'''Example:''' table_5=@xml.Submission Budget.Other-Grants.Funders[#|~Funder.nodevalue~|~currency(Amount.nodevalue)~|#]@;
{{WordMergeLinks}}
[[Category:Custom Fields]][[Category:XML]]
Smartstaff, administrator
4,478
edits

Navigation menu