set data set value

Set the value of one or more cells of a column in a data set.
NameDescriptionTypeModifier
data set

Name of the data set (see ).

StringNone
row

(Optional - see ) Row number of the cell (Row numbers start at 1, exclusive of any header row).

StringNone
column

Column number of the cell (Column numbers start at 1).

StringNone
value

Value to which the cell contents are to be set.

StringNone
criterion

(Optional - see ) Boolean expression establishing the filter criteria (see ), or a named filter as defined by the filter action.

StringNone
None
This action may be used within the following project items: test modules and user-defined actions.
The following settings are applicable to this action: remove double quotes from cells.
Example - Case 1: using the row argument
  1. Add a new value, 1 Smith Lane, to the Address cell at row 1, column 5 of the Customers dedicated data set.
  2. Check in the dedicated data set.
        
          	data set	row	column	value	criterion
set data set value	/Customer info/Customers	1	5	1 Smith Lane	
&nbsp					
	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"
&nbsp					
	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
      PrecedenceComparison operatorMeaning
      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
      Table 2. Logical operators
      PrecedenceLogical operatorMeaning
      5notValue is TRUE if its operand is FALSE.
      6andValue is TRUE if and only if both sides of the and operator are TRUE.
      7orValue is TRUE if either side of the or operator is TRUE.
      Notes: 
      For the full list of operator precedence, see here.
  • 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.

Copyright © 2024 LogiGear Corporation. All rights reserved. LogiGear is a registered trademark, and Action Based Testing and TestArchitect are trademarks of LogiGear Corporation. All other trademarks contained herein are the property of their respective owners.

LogiGear Corporation

1730 S. Amphlett Blvd. Suite 200, San Mateo, CA 94402

Tel: +1 (650) 572-1400