Table of Contents: User and Administrator Guide : Mashup Center 184.108.40.206
The Count function returns the number of elements with a specific name in a set of elements.
To create an output element that counts the number of elements from an input feed, the elements used must be nested within a higher level element.
For example, an input operator to the current operator contains an element named feed
that contains several child elements named entry
To count the number of entry
elements, for the Expression Value
parameter you would select Specify a value from the Input tree
. In the tree, you would select the entry
element or a child element of the entry
A value that you want to return the count from.
For the Expression Value
parameter you can:
- Specify a text value. (For this function, specify a numeric value.)
- Specify a function value.
- Use a variable to return the value.
- Specify a value from the Input tree.
When you apply the Count function to an output feed element, the output feed contains a single element with an Integer value.
In the following example of an input feed, the containing element is the school
element that contains instances of the child element roomID
The Expression Value
for the Count function would look similar to:
In this example, when you use the Count function to create a new output feed element, all of the instances of roomID
from the input feed are used as input. The output feed contains a single element with a numeric value that represents the count value of the number of roomID
The preview of the output feed contains the output element, and the value of the element is the number of the roomID
elements in the input feed.
Parent topic: Functions : Mashup Center 220.127.116.11
Using aggregate functions effectively : Mashup Center 18.104.22.168
Functions : Mashup Center 22.214.171.124