Advanced Customization > Info*Engine User’s Guide > Task Webject Reference > Group Webjects > Copy-Group
  
Copy-Group
DESCRIPTION
Copies a group to a new group of a different name. For example, the webject might copy all the data in group “A”, creating a new group called “B” with exactly the same information.
SYNTAX
<ie:webject name="Copy-Group" type="GRP">
  <ie:param name="GROUP_IN" data="group_in_name"/>
  <ie:param name="GROUP_OUT" data="group_out_name"/>
</ie:webject>
PARAMETERS
Required
Select
Optional
GROUP_IN
GROUP_OUT
GROUP_IN
Specifies the name of the group to be copied. This parameter is required.
GROUP_OUT
Specifies the name of the new group that is created. This name must not be identical to the GROUP_IN name. This parameter is required.
EXAMPLE
The following example copies the input group named “createdgroup” into the “results” group and returns both groups (using the Return-Groups webject) to the local output group collection:
<%@page language="java" session="false"%>
<%@taglib uri="http://www.ptc.com/infoengine/taglib/core"
                                               prefix="ie"%>

<!-- Copies a group to a new group. -->

<ie:task uri="com/company/CreateGroup.xml"/>

<ie:webject name="Copy-Group" type="GRP">
  <ie:param name="GROUP_IN" data="createdgroup"/>
  <ie:param name="GROUP_OUT" data="results"/>
</ie:webject>

<ie:webject name="Return-Groups" type="GRP">
  <ie:param name="GROUP_IN" data="createdgroup"/>
  <ie:param name="GROUP_IN" data="results"/>
</ie:webject>
The XML output from executing the example is the following:
<?xml version="1.0" encoding="UTF-8"?>
<wc:COLLECTION xmlns:wc="http://www.ptc.com/infoengine/1.0">
<EmployeeData NAME="createdgroup" TYPE="Object" STATUS="0">
  <wc:INSTANCE>
    <NAME>Sam Johnson</NAME>
    <ADDRESS>1234 Main St.</ADDRESS>
    <EMAIL>sjohnson@somewhere.com</EMAIL>
  </wc:INSTANCE>
  <wc:INSTANCE>
    <NAME>Harvy Anderson</NAME>
    <ADDRESS>1234 Amber St.</ADDRESS>
    <EMAIL>handerson@somewhere.com</EMAIL>
  </wc:INSTANCE>
  <wc:INSTANCE>
    <NAME>James O&apos;Connor</NAME>
    <ADDRESS>775 Main St.</ADDRESS>
    <EMAIL></EMAIL>
  </wc:INSTANCE>
  <wc:INSTANCE>
    <NAME>Harvey Hampton</NAME>
    <ADDRESS>775 Main St.</ADDRESS>
    <EMAIL>hhampton@somewhere.com</EMAIL>
  </wc:INSTANCE>
</EmployeeData>
<EmployeeData NAME="results" TYPE="Object" STATUS="0">
  <wc:INSTANCE>
    <NAME>Sam Johnson</NAME>
    <ADDRESS>1234 Main St.</ADDRESS>
    <EMAIL>sjohnson@somewhere.com</EMAIL>
  </wc:INSTANCE>
  <wc:INSTANCE>
    <NAME>Harvy Anderson</NAME>
    <ADDRESS>1234 Amber St.</ADDRESS>
    <EMAIL>handerson@somewhere.com</EMAIL>
  </wc:INSTANCE>
  <wc:INSTANCE>
    <NAME>James O&apos;Connor</NAME>
    <ADDRESS>775 Main St.</ADDRESS>
    <EMAIL></EMAIL>
  </wc:INSTANCE>
  <wc:INSTANCE>
    <NAME>Harvey Hampton</NAME>
    <ADDRESS>775 Main St.</ADDRESS>
    <EMAIL>hhampton@somewhere.com</EMAIL>
  </wc:INSTANCE>
</EmployeeData>
</wc:COLLECTION>