Advanced Customization > Info*Engine User’s Guide > Task Webject Reference > Group Webjects > Change-Group
  
Change-Group
DESCRIPTION
Changes the name of one or more attributes in a group. The resulting group contains the changed attributes and all attributes not affected by the change.
SYNTAX
<ie:webject name="Change-Group" type="GRP">
  <ie:param name="GROUP_IN" data="value"/>
  <ie:param name="GROUP_OUT" data="group_out_name"/>
  <ie:param name="RENAME" data="'old_name'='new_name'"/>
</ie:webject>
PARAMETERS
Required
Select
Optional
GROUP_IN
GROUP_OUT
RENAME
GROUP_IN
Specifies the name of the group with information to be renamed. This parameter is required.
GROUP_OUT
Specifies the name of the resulting group with renamed information. If GROUP_OUT is specified, the original group is replaced by the output group and is no longer available in the VDB. The default for this parameter is for the attribute changes to be made in the original group. This parameter is optional.
RENAME
Specifies the attribute name to be changed. Specific syntax is required when renaming an attribute. For example, to change the attribute name objectClass to XYZclass, the following RENAME parameter would be specified:
<ie:param name="RENAME" data="'objectClass'='XYZclass'">
As shown above, the value of the RENAME parameter must be enclosed in double quotes. The old name and the new name of the attribute both must be enclosed in single quotes. Attribute names are case insensitive, therefore case is ignored when the parameter searches for the existing attribute name.
This parameter is required.
EXAMPLE
The webject changes the attribute names in the input group named “createdgroup” and adds the “results” group to the local output group collection:
<%@page language="java" session="false"%>
<%@taglib uri="http://www.ptc.com/infoengine/taglib/core" prefix="ie"%>

<!-- Creates input group named createdgroup. -->

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

<!-- Renames attributes in a group. -->

<ie:webject name="Change-Group" type="GRP">
  <ie:param name="GROUP_IN" data="createdgroup"/>
  <ie:param name="RENAME" data="'ADDRESS'='HomeAddress'"/>
  <ie:param name="RENAME" data="'NAME'='FullName'"/>
  <ie:param name="RENAME" data="'EMAIL'='email'"/>
  <ie:param name="GROUP_OUT" 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="results" TYPE="Object" STATUS="0">
  <wc:INSTANCE>
    <FullName>Sam Johnson</FullName>
    <HomeAddress>1234 Main St.</HomeAddress>
    <email>sjohnson@somewhere.com</email>
  </wc:INSTANCE>
  <wc:INSTANCE>
    <FullName>Harvy Anderson</FullName>
    <HomeAddress>1234 Amber St.</HomeAddress>
    <email>handerson@somewhere.com</email>
  </wc:INSTANCE>
  <wc:INSTANCE>
    <FullName>James O&apos;Connor</FullName>
    <HomeAddress>775 Main St.</HomeAddress>
    <email></email>
  </wc:INSTANCE>
  <wc:INSTANCE>
    <FullName>Harvey Hampton</FullName>
    <HomeAddress>775 Main St.</HomeAddress>
    <email>hhampton@somewhere.com</email>
  </wc:INSTANCE>
</EmployeeData>
</wc:COLLECTION>