Knowledge Base - Template Designer

Use data source fields in code

The application creates a XDocument object for the data sources.

The name of the variable is the name of the data source.

You can navigate in the object using .Element(), .Elements() or Descendants(). For more information on the this topic, refer to Microsoft’s LINQ to XML overview.

When a loop is inserted, a XElement object is inserted.

The name of the variable is the name of the data source suffixed by the name of node you’re iterating through

To help, you can look at the generated .cs file saved under the path configured in the Options. Ensure Keep temporary files is checked.