Develop > Server Automation Platform > Search filter syntax

Search filter syntax

Filter grammar

A search filter is a parameter for methods such as findServerRefs. The expression in a search filter enables you to get references to SA objects (such as servers and folders) according to the values of the object attributes. The formal syntax for a search filter follows:

<filter> 		::= 	(<expression-junction>)+
<expression-junction>   ::= 	 <expression-list-open> <junction>
(<expression>)+ <expression-list-close>
<expression> 		 ::= 	 <expression-open> <attribute> <general-delimiter> <operator> <general-delimiter> <value-list> <expression-close>

<attribute> 		 ::= 	 <resource_field> 
<vo_member> 		 ::= 	 <text>
<resource_field> 	 ::= 	 <text>
<value-list> 		 ::= 	 (<double-quote> <text> <double-quote>)* |
(<number>)*
<text> 	 	 ::= 	 [a-z] [A-Z] [0-9]
<number> 		 ::= 	 [0-9] [.]
<junction> 		::= 	 <union-junction> | <intersect-junction>
<union-junction> 	 ::= 	 ‘|’
<intersect-junction 	 ::= 	 ‘&’
<expression-list-open>  ::= 	 ‘(‘
<expression-list-close> ::= 	 ‘)’
<expression-open> 	 ::= 	 ‘(‘ | ‘{‘
<expression-close> 	 ::= 	 ‘(‘ | ‘}’
<general-delimiter> 	 ::= 	 <whitespace>
<whitespace> 		 ::= 	 ‘ ‘
<double-quote> 	 ::= 	 ‘”’
<escape-character> 	 ::= 	 ‘\’
<operator> 		 ::= 	 <equal_to> |...| <contains_or_above>
Valid operators for the preceding line:

<equal_to> 		 ::= 	 ‘=’ | ‘EQUAL_TO’
<not_equal_to> 	 ::= 	 ‘!=’ | ‘<>’ | ‘NOT_EQUAL_TO’
<in> 			 ::= 	 ‘=’ | ‘IN’
<not_in> 		 ::= 	 ‘!=’ | ‘<>’ | ‘NOT_IN’
<greater_than> 	 ::= 	 ‘>’ | ‘GREATER_THAN’
<less_than> 		 ::= 	 ‘<‘ | ‘LESS_THAN’
<greater_than_or_equal> ::= 	 ‘>=’ | ‘GREATER_THAN_OR_EQUAL’
<less_than_or_equal> 	 ::= 	 ‘<=’ | ‘LESS_THAN_OR_EQUAL’
<begins_with> 		 ::= 	 ‘=*’ | ‘BEGINS_WITH’
<ends_with> 		 ::= 	 ‘*=’ | ‘ENDS_WITH’
<contains> 		 ::= 	‘*=*’ | ‘CONTAINS’
<not_contains> 	 ::= 	‘*<>*’ | ‘NOT_CONTAINS’
<in_or_below> 		 ::= 	‘IN_OR_BELOW’
<in_or_above> 		 ::= 	‘IN_OR_ABOVE’
<between> 		 ::= 	‘BETWEEN’
<not_between> 		 ::= 	‘NOT_BETWEEN’
<not_begins_with> 	 ::= 	‘NOT_BEGINS_WITH’
<not_ends_with> 	 ::= 	‘NOT_ENDS_WITH’
<is_today> 		 ::= 	‘IS_TODAY’
<is_not_today> 	 ::= 	‘IS_NOT_TODAY’
<within_last_days> 	 ::= 	‘WITHIN_LAST_DAYS’
<within_last_months> 	 ::= 	‘WITHIN_LAST_MONTHS’
<within_next_days> 	 ::= 	‘WITHIN_NEXT_DAYS’
<within_next_months> 	 ::= 	‘WITHIN_NEXT_MONTHS’
<not_within_last_days>  ::= 	‘NOT_WITHIN_LAST_DAYS’
<not_within_last_months>::= 	‘NOT_WITHIN_LAST_MONTHS’
<not_within_next_days>  ::= 	‘NOT_WITHIN_NEXT_DAYS’
<not_within_next_months>::= 	‘NOT_WITHIN_NEXT_MONTHS’
<contains_or_below> 	 ::= 	‘CONTAINS_OR_BELOW’
<contains_or_above> 	 ::= 	‘CONTAINS_OR_ABOVE’