countGroupedItemsAdded by IBM on August 8, 2013 | Version 1 (Original)
|Counts the number of items in a group. countGroupedItems can also count the number of items in a group that have a particular characteristic, such as a specific option or setting.
countGroupedItems returns any of the following:
- The total number of items in a group.
- The total number of items in a group that have a particular option. For example, the number of items with a bgcolor setting in a group.
- The total number of items in a group that have a particular option setting. For example, the number of items with a bgcolor set to blue in a group.
Table 1. countGroupedItems parameters
countGroupedItems(group, option, literal, groupContext, groupContextType,
|group||String||The name of the group that you want to get an item from. This name can include a page reference, such as "Page1.myGroup".|
|option||String||Optional. If supplied, the function will only count items that contain this option.|
|literal||String||Optional. If supplied, the function will only count items that have the specified option set to this value. Must be used with theoption parameter.|
|groupContext||String||Optional. The starting point to use to locate the group if the group name is not fully qualified. For example, if the group was on the first page, you would use "Page1".|
|groupContextType||String||Optional. The level of the group context parameter, such as page, item or option. Currently, only page is valid.|
|referenceType||String||Optional. Sets the scope of the reference that is returned. The reference begins at the level under this. For example, to get a reference that begins at the page level, set this parameter to page Valid settings are form and page. The default reference type is form.|
|scheme||String||Optional. The referencing scheme used. The default scheme is XFDL.|
Returns The number of items that match the search criteria or an empty string if an error occurs.
Example In this example, the field displays the number of items in a group called "Green".
<label>The Green group contains this many items:</label>