filter

Establish a named filter for an inline or dedicated data set.
NameDescriptionTypeModifier
name

Name to assign to the filter.

StringNone
criterion

Boolean expression establishing the filter criteria.

StringNone
None
This action may be used within the following project items: test modules, data set modules, user-defined actions
The following settings are applicable to this action: remove double quotes from cells.
                                
                                    	name			
create data set	Car Rental1			
&nbsp				
&nbsp	duration	country pickup	state pickup	city pickup
row	3	Canada	British Columbia	Kamloops
row	1	United States	Texas	Houston
row	2	United States	Florida	Brossard
row	5	United States	California	San Diego
row	4	Canada	Manitoba	Dauphin
&nbsp				
	name	criterion		
filter	canada_country	country pickup="Canada"		
&nbsp				
end create data set				
	data set	path	comments	
check in data set	Car Rental1			
&nbsp				
	name	filter		
use data set	/Car Rental1	canada_country		
&nbsp				
	text			
report	#state pickup			
report	#city pickup			
&nbsp				
repeat for data set				
                                
                            
  • This action may be employed within either a dedicated data set or an inline data set (within the confines of a create data set/end create data set construct, in a test module or user-defined action).
  • The filter action associates a set of filter criteria with a name. It does not, in and of itself, have the effect of filtering data. The actual filtering of data occurs when the established filter is invoked, either by a use data set, use filter, or set data set value action.
  • 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.
  • 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