Advanced Customization > Info*Engine User’s Guide > Info*Engine Data Management > Dynamic Parameter Value Substitution > Substitution Expressions for VDB Data Group-Specified Values
  
Substitution Expressions for VDB Data Group-Specified Values
When information must come from a VDB group that has been generated, the substitution expressions that access a VDB data group makes this information available within a webject even though the exact value is not known at the time the task is being designed.
* 
The VDB group must be available to the webject before the webject executes. You cannot execute the task that creates the group from within the webject.
You can use substitution expressions in any data attribute value on a param tag.
To specify one parameter value that is substituted from a VDB data group, the parameter value can be similar to the following:
data=$(grp_name[]att_name[])
Use grp_name[] in these formats when there is only one element (row) in the group named “grp_name.” Use att_name[] in these formats when there is only one value in the att_name attribute. If the data group has more than one element, you can use grp_name[0] to access the first element in the group and use grp_name[N] to access the last element in the group. To access other elements, you can specify the index of the element inside the brackets. Similarly, you can use 0, N, or other indices inside the brackets to access a specific value in the attribute named by att_name[].
To specify multiple parameter values as input, you include the asterisk (*) as the value selector. To format multiple parameter values correctly, you must also include the delim attribute to identify the comma as the separator in the string that is substituted. For multiple values, the parameter value can be similar to the following:
data=$(grp_name[]att_name[*]) delim=","
The asterisk in the value selector, [*], selects all values and concatenates them together into a string using the comma as a separator. The delim attribute tells the webject that multiple values in the data attribute are separated by a comma.
The last set of formats assumes that there is only one element in the named group. If the data group has more than one element, you can use grp_name[0] to access the first element in the group and use grp_name[N] to access the last element in the group. To access other elements, you can specify the index of the element inside the brackets.
For more information, see General Value Substitution Syntax.
Example: Create-Group Substitution Using A VDB Data Group
Assume that the following table represents the elements (rows), attributes (column headings) and attribute values (cells in columns) in the “EMP” VDB group:
ename
phone
Burton, Jack
873-2302
Law, Gracie
873-2200
LoPan, David
873-3313
You can create a new group called “salesEmp” by adding the DEPT attribute column to the “EMP” group using substitution in the following Create-Group webject:
<ie:webject name="Create-Group" type="GRP">
  <ie:param name="ELEMENT" data="NAME=$(EMP[0]ename[]):
              TELEPHONE=$(EMP[0]phone[]):DEPT=Sales"/>
  <ie:param name="ELEMENT" data="NAME=$(EMP[1]ename[]):
              TELEPHONE=$(EMP[1]phone[]):DEPT=Sales"/>
  <ie:param name="ELEMENT" data="NAME=$(EMP[2]ename[]):
              TELEPHONE=$(EMP[2]phone[]):DEPT=Sales"/>
  <ie:param name="CLASS" data="SalesEmployees"/>
  <ie:param name="GROUP_OUT" data="salesEmp"/>
</ie:webject>
After substitution processing by Info*Engine, the parameters in the webject are as follows:
<ie:webject name="Create-Group" type="GRP">
  <ie:param name="ELEMENT" data="NAME=Burton, Jack:
              TELEPHONE=873-2302:DEPT=Sales"/>
  <ie:param name="ELEMENT" data="NAME=Law, Gracie:
              TELEPHONE=873-2200:DEPT=Sales"/>
  <ie:param name="ELEMENT" data="NAME=LoPan, David:
              TELEPHONE=873-3313:DEPT=Sales"/>
  <ie:param name="CLASS" data="SalesEmployees"/>
  <ie:param name="GROUP_OUT" data="salesEmp"/>
</ie:webject>
Executing the Create-Group webject creates the “salesEmp” group that is represented by the following table:
NAME
TELEPHONE
DEPT
Burton, Jack
873-2302
Sales
Law, Gracie
873-2200
Sales
LoPan, David
873-3313
Sales