GetValue Step In-Place Editing

A GetValue command retrieves the value of a field from a composite variable, possibly filtering by the values of other fields. Additionally, if the filtering operation yields multiple values, an aggregation operator can be applied to the values list.

To edit a GetValue script step:

  1. Select the GetValue step in the Test Steps table.
  2. Edit the step parameters as follows:
    • Return Variable: This column displays the return variable name. You can specify the return variable.
    • Command String: This column displays the composite variable name, the field whose value is to be retrieved, and the filtering expression. If the filter result is a list of values, an aggregation operator (Avg, Min, Max, Med, Count, Sum, First, Last) can be applied to the list such as to reduce it to a single value. For results that are enclosed within quotes, you can use the Merge operator to remove the leading and trailing quotes.
    • For example, assuming we had a composite_var variable holding two numeric lists, listA (1, 1, 2, 3, 1) and listB (a, b, a, c, d), you could use the following command to filter listB for the fields of listA that have a value of 1:

      GetValue var1 composite_var listB listA 1

      which would return a var1 variable having the "a b d" value.

      As another example, the following command that also uses an aggregator:

      GetValue var1 composite_var Count listB listA 1

      would instead return a var1 variable having the "3" value.

      Click into the column and edit in-place the composite variable name, the name of the field to retrieve, the filtering expression, and the aggregation operator (optional).

      Alternatively, click the button displaying a drop-down pane and edit these parameters using the form fields.

  Example:

Assuming we had a composite_var variable holding two numeric lists, listA (1, 1, 2, 3, 1) and listB (a, b, a, c, d), you could use the following command to filter listB for the fields of listA that have a value of 1:

  GetValue var1 composite_var listB listA 1

  which would return a var1 variable having the "a b d" value.

  The following command that also uses an aggregator:

 GetValue var1 composite_var Count composite_var listB
 listA 1

  would instead return a var1 variable the "3" value.