set data set value
Set the value of one or more cells of a column in a data set.
Name | Description | Type | Modifier |
---|---|---|---|
data set | Name of the data set (see ). | String | None |
row | (Optional - see ) Row number of the cell (Row numbers start at 1, exclusive of any header row). | String | None |
column | Column number of the cell (Column numbers start at 1). | String | None |
value | Value to which the cell contents are to be set. | String | None |
criterion | (Optional - see ) Boolean expression establishing the filter criteria (see ), or a named filter as defined by the filter action. | String | None |
None
This action may be used within the following project items: test modules and user-defined actions.
Example - Case 1: using the row argument
- Add a new value,
1 Smith Lane
, to the Address cell at row1
, column5
of the Customers dedicated data set. - Check in the dedicated data set.
data set row column value criterion
set data set value /Customer info/Customers 1 5 1 Smith Lane
 
data set path comments
check in data set /Customer info/Customers
Result
Example - Case 2: Inline data sets
data set row column value criterion
set data set value /Customer info/Customers 3 Patti CusID="04"
 
data set path comments
check in data set /Customer info/Customers
Result
- The data set argument may specify a dedicated data set or inline data set that has already been defined within the test.
- for a dedicated data set: the full TA path from the Data node must be specified, with forward slashes (/) delimiting each level of the hierarchy.
- for an inline data set: only the name (no path) of the data set is necessary.
- row and criterion arguments: Either, but not both, of these arguments is required. If both are supplied, criterion is ignored. Each of these arguments is responsible for selecting the row for the cell to be modified (And in the case of criterion, multiple rows may be selected).
- When the filter is applied, those rows of the data set whose values do not produce a True when applied to the expression in criterion are filtered out. For example, if criterion is set to
region = 2 and period >= 2002
, the filter excludes those rows in which region is not 2, as well as those rows for which period is earlier than 2002. - The following operators may be used within an expression in the criterion argument:
Table 1. Comparison operators
Table 2. Logical operatorsPrecedence Comparison operator Meaning 4 = equal to 4 <> not equal to 4 > greater than 4 >= greater than or equal to 4 < less than 4 <= less than or equal to Precedence Logical operator Meaning 5 not Value is TRUE if its operand is FALSE. 6 and Value is TRUE if and only if both sides of the and operator are TRUE. 7 or Value is TRUE if either side of the or operator is TRUE. Notes:For the full list of operator precedence, see here.
- When the filter is applied, those rows of the data set whose values do not produce a True when applied to the expression in criterion are filtered out. For example, if criterion is set to
- If the value in row exceeds the current number of rows in the data set, empty rows are appended until the data set has row rows, after which the value in the designated cell is set.
- If the data set is inline, all added data are stored in memory.
- If the data set is a module, the data set is first checked out (if not yet in that state), and then modified. During the checkout process, TestArchitect issues a warning/error if either of the following conditions hold:
- the data set is currently checked out by another user.
- the current user does not have sufficient permission to modify data sets.
Following execution of this action, it is highly recommended that you use a check in data set action to ensure that all changes to the data set are available before it is actually used.
- This action supports the <ignore> modifier. If the string
<ignore>
is present as the value of any of the arguments, or any argument contains an expression that evaluates to<ignore>
, the action is skipped during execution.