Setting a function to concatenate the values of item types
You can set a function to concatenate the values of multiple item types so that the values are displayed as the value of another item type.
Before you begin
You must have completed the following tasks:
- Defined a schema. See Schema design overview.
- Created the structural view of the schema. Designing a structural view of a schema.
Procedure
- Select your project in HCL OneTest™ Server and go to the Data Fabrication page.
- Click Schemas, and then select the schema for which you want to generate the test data.
-
Open the structural view of the schema.
Important: You must have all the item types in the same group type for the values that you want to concatenate.The Structure dialog box is displayed.
-
Select the item type for which you want the values of the generated test data
in the concatenated format.
Note: You must not place the item type, for which you want the values in the concatenated format, in the same group type.For example, consider that a schema includes a group type, group_name1 and three item types such as item type1, item type2, and item type3. If you want to concatenate the values of item type1 and item type2 as the generated value of item type3, then you must add item type1 and item type2 item types in the group_name1 group type. You must ensure that item type3 does not exist in the group_name1 group type.
-
Click the menu on the right side of the Structure dialog
box.
A blank field is displayed next to all the item types.
-
Click the blank field of the item type for which you want to set the function
for concatenation.
The Rule Editor pane is displayed on the page.
- Enter the equal sign (=) in the Rule Editor menu.
-
Select the
SERIESTOTEXT()
function from the Insert mapping functions icon.Note: You can also provide the following rule manually in the Rule Editor pane:"item type1" + "item type2"
. -
Provide the name of the group type as the parameter for this function.
For example, if you have a group_name1 group type, then you must provide the following function:
SERIESTOTEXT(group_name1:OUT1)
-
Press Enter.
The selected function is displayed in the item type field of the Structure dialog box.
- Save the changes.
Results
You have successfully set the function to concatenate the values of multiple item types.