Advanced Customization > Info*Engine User’s Guide > Task Webject Reference > Group Webjects > Return-Groups
  
Return-Groups
DESCRIPTION
Returns multiple groups from a task. These groups can then be used by calling tasks or JSP pages.
By default, only the last group that is created is available to the caller of a task.
SYNTAX
<ie:webject name="Return-Groups" type="GRP">
  <ie:param name="GROUP_IN" data="group_names"/>
</ie:webject>
PARAMETERS
Required
Select
Optional
GROUP_IN
GROUP_IN
Specifies the names of the multiple groups to return. The special value “ * ” can be specified to return all groups produced by a task.
To specify multiple group names, you can include multiple 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"/>
<ie:param name="GROUP_IN" data="group3"/>
This parameter is required.
EXAMPLE
The following example creates two groups using the CreateGroup and CreateGroupHr task tags and then returns the groups using the Return-Groups webject:
<%@page language="java" session="false"%>
<%@taglib uri="http://www.ptc.com/infoengine/taglib/core"
                                               prefix="ie"%>

<!--Create a group named createdgroup. -->
<ie:task uri="com/company/CreateGroup.xml"/>

<!--Create a group named createdhrgroup. -->
<ie:task uri="com/company/CreateGroupHr.xml"/>

<!-- Return multiple groups. -->

<ie:webject name="Return-Groups" type="GRP">
  <ie:param name="Group_in" data="createdgroup"/>
  <ie:param name="Group_in" data="createhrgroup"/>
</ie:webject>
The XML output from executing the ReturnGroups.xml file 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>
<EmployeeHrData NAME="createhrgroup" TYPE="Object" STATUS="0">
  <wc:INSTANCE>
    <NAME>Sam Johnson</NAME>
    <POSITION>Engineer</POSITION>
    <PHONE>555-111-1111</PHONE>
  </wc:INSTANCE>
  <wc:INSTANCE>
    <NAME>Harvy Anderson</NAME>
    <POSITION>Marketing</POSITION>
    <PHONE>555-222-2222</PHONE>
  </wc:INSTANCE>
  <wc:INSTANCE>
    <NAME>James O&apos;Connor</NAME>
    <POSITION>Management</POSITION>
    <PHONE></PHONE>
  </wc:INSTANCE>
</EmployeeHrData>
</wc:COLLECTION>