Search

Module: Editor

Version: 4.4.0 +

User: Developer

Object Type: Action Object

Parent of:

no children

Child of:

- XmlBuilder

 

Description

Within Futurama XmlBuilders can be used to create an XML structure. It is possible to create this XML structure by either defining each child of the XML tree separately or by using the loop functionality of an XmlBuilder. This loop can be created by using the RepeatData and RepeatTarget properties of the XmlBuilder. Loops are for example used when creating an XmlBuilder with data of all the persons in your administration. For each person the same information has to be given in the XML, so a loop can be made with this information.

The Aggregation object can be used in the context of creating XML by looping over data. The Aggregation object must be a child of an XmlBuilder with the properties RepeatData and RepeatTarget filled (i.e. an XmlBuilder to loop over for example persons). With the Aggregation object totals can be calculated for items within the loop. An example to make this more clear. Suppose for each person in your administration the salary must be given in the XML. In that case the Aggregation field can be used to give the total salary sum. This total salary sum is displayed in the output XML. An advantage of the object is that totals can be calculated during the building of the XML Tree. Alternative would be to retrieve the total sum by using XPath queries. Especially in large XML files this can take some time to calculate. So the Aggregation object minimizes the time to retrieve this kind of information. 

If you select ItemsToGroupBy, you can easily divide the totals into multiple totals for all the different combined values of the items to group by.

Properties

ItemsToAggregate

A list of references to the items that you want to aggregate. You can only add items that have a type long or double. The XmlName of the Reference is used to determine the name of the aggregated field in the resulting XML. An example of an item to aggregate is the salary of a person.

ItemsToGroupBy

A list of references to the items that you want to have groups for. Futurama maintains a list of groups for all the combinations of the values of the ItemsToGroupBy. Suppose you want to see the salary sum of your employees, and want to divide this in the salary sum of the employees of company A and the salary sum of the employees of company B. In that case the company name is the ItemToGroupBy and the salary is the ItemToAggregate.

XmlName

The name to use as the top level XML element. If the name start with a $, the top level XML field is omitted. This field is mandatory.

XmlGroupByName

The name that is used for the XML element that contains the totals for a group. If you specify ItemsToGroupBy, this name is mandatory.

Related Topics

- XmlConverter

- FileSaver

- Action

Feedback

If you have any questions about this subject or if you want to provide us feedback please send us an e-mail.

Updated: 2014-09-29