Merge-Groups
DESCRIPTION
Combines two groups into one and allows duplication of information contained in one or both groups.
|
The difference between the Join-Groups webject and the Merge-Groups webject depends on how duplicate information is treated. The results of joining groups is that duplicated information is eliminated. Merging groups of data allows duplicates to be preserved.
|
SYNTAX
<ie:webject name="Merge-Groups "type="GRP">
<ie:param name="CASE_IGNORE" data="[TRUE | FALSE]"/>
<ie:param name="CLASS" data="class"/>
<ie:param name="COMPARISON" data="[ALPHA | NUMERIC]"/>
<ie:param name="GROUP_IN" data="input_groups"/>
<ie:param name="GROUP_OUT" data="output_group_name"/>
<ie:param name="SORTBY" data="attribute"/>
<ie:param name="SORTED" data="[ASC | DESC]"/>
</ie:webject>
PARAMETERS
Required
|
Select
|
Optional
|
GROUP_IN
|
|
CASE_IGNORE
|
GROUP_OUT
|
|
CLASS
|
|
|
COMPARISON
|
|
|
SORTBY
|
|
|
SORTED
|
CASE_IGNORE
Acts as a flag for case. If TRUE is specified, case is ignored. If FALSE is specified, then case is significant. The default for this parameter is FALSE. This parameter is optional.
CLASS
Specifies the type of the objects contained in the output group named by the GROUP_OUT parameter. For example if a webject specifies CLASS=MyClassName and GROUP_OUT=data_1, then the XML representation of the output group contains the following tags:
<MyClassName NAME="data_1" TYPE="Object" STATUS="0">
</MyClassName>
The default for this parameter is “Unknown-Class-Name.” This parameter is optional.
COMPARISON
Describes how to compare the two groups: either ALPHA for an alpha-numeric comparison or NUMERIC for a strictly numeric comparison. The default for this optional parameter is ALPHA.
GROUP_IN
Specifies the names of the two groups to be used in computing a merge. To specify two group names, you can include two lines with different values for the GROUP_IN parameter. For example:
<ie:param name="GROUP_IN" data="group1"/>
<ie:param name="GROUP_IN" data="group2"/>
This parameter is required.
GROUP_OUT
Identifies the name of the resulting merge of the two groups specified using the GROUP_IN and MERGEBY parameters. This parameter is required.
SORTBY
Specifies the name of the attribute on which the sorting is done. If you do not include this parameter, the results are not sorted. This parameter is optional.
SORTED
Determines how values in the resulting group are sorted. The attribute named in the SORTBY parameter determines which values are sorted. Specify ASC to sort in ascending order or specify DESC to sort in descending order. The default for this parameter is ASC. This parameter is optional.
EXAMPLE
The following example combines the two specified GROUP_INs, sorts the data by the NAME attribute in ascending order, and places the resulting merged and sorted data in an output group named “results”:
<%@page language="java" session="false"%>
<%@taglib uri="http://www.ptc.com/infoengine/taglib/core"
prefix="ie"%>
<!-- Form a group by merging two groups -->
<ie:task uri="com/company/CreateGroup.xml"/>
<ie:task uri="com/company/CreateGroupHr.xml"/>
<ie:webject name="Merge-Groups" type="GRP">
<ie:param name="GROUP_IN" data="createdgroup"/>
<ie:param name="GROUP_IN" data="createhrgroup"/>
<ie:param name="SORTBY" data="NAME"/>
<ie:param name="SORTED" data="ASC"/>
<ie:param name="GROUP_OUT" data="results"/>
</ie:webject>