Skip to content

Reference: Filter Syntax

kporangehat edited this page Dec 8, 2010 · 27 revisions

'relation' comparison operators:

Operator                    Arguments  
--------                    ---------  
'is'                        [field_value] | None  
'is_not'                    [field_value] | None  
'less_than'                 [field_value] | None  
'greater_than'              [field_value] | None  
'contains'                  [field_value] | None  
'not_contains'              [field_value] | None  
'starts_with'               [string]  
'ends_with'                 [string]  
'between'                   [[field_value] | None, [field_value] | None]  
'not_between'               [[field_value] | None, [field_value] | None]  
'in_last'                   [[int], 'HOUR' | 'DAY' | 'WEEK' | 'MONTH' | 'YEAR']  
'in_next'                   [[int], 'HOUR' | 'DAY' | 'WEEK' | 'MONTH' | 'YEAR']  
'in'                        [[field_value] | None, ...]	# Array of field values  
'type_is'                   [string] | None				# Shotgun entity type  
'type_is_not'               [string] | None 			# Shotgun entity type  
'in_calendar_day'           [int]						# Offset (e.g. 0 = today, 1 = tomorrow, 
														# -1 = yesterday)  
'in_calendar_week'          [int]						# Offset (e.g. 0 = this week, 1 = next week,  
														# -1 = last week)  
'in_calendar_month'         [int]						# Offset (e.g. 0 = this month, 1 = next month,  
														# -1 = last month)  
'name_contains'             [string]  
'name_not_contains'         [string]  
'name_starts_with'          [string]  
'name_ends_with'            [string]

'relation' comparison operators grouped by data type:

addressing	                'is'    
						    'is_not'  
						    'contains'  
						    'not_contains'  
						    'in'  
						    'type_is'  
						    'type_is_not'  
						    'name_contains'  
						    'name_not_contains'  
						    'name_starts_with'  
						    'name_ends_with'  
  
checkbox                    'is'  
							'is_not'  
  
currency                    'is'  
						    'is_not'  
						    'less_than'  
						    'greater_than'  
						    'between'  
						    'not_between'  
						    'in'  
  
date                        'is'  
						    'is_not'  
						    'less_than'  
						    'greater_than'  
						    'between'  
						    'not_between'  
						    'in_last'  
						    'in_next'  
						    'in'  
						    'in_calendar_day'  
						    'in_calendar_week'  
						    'in_calendar_month'  
  
date_time                   'is'  
						    'is_not'  
						    'less_than'  
						    'greater_than'  
						    'between'  
						    'not_between'  
						    'in_last'  
						    'in_next'  
						    'in'  
						    'in_calendar_day'  
						    'in_calendar_week'  
						    'in_calendar_month'  
  
duration                    'is'  
						    'is_not'  
						    'less_than'  
						    'greater_than'  
						    'between'  
						    'not_between'  
						    'in'  
  
entity                      'is'  
						    'is_not'  
						    'in'  
						    'type_is'  
						    'type_is_not'  
						    'name_contains'  
						    'name_not_contains'  
						    'name_starts_with'  
						    'name_ends_with'  
  
float                       'is'  
						    'is_not'  
						    'less_than'  
						    'greater_than'  
						    'between'  
						    'not_between'  
						    'in'  
  
image                       ** Filtering by this data type not supported 
  
list                        'is'  
						    'is_not'  
						    'contains'  
						    'not_contains'  
						    'starts_with'  
						    'ends_with'  
						    'in'  
  
multi_entity                'is' ** Note:  when used on multi_entity, this functions as 
											you would expect 'contains' to function  
						    'is_not'  
						    'in'  
						    'type_is'  
						    'type_is_not'  
						    'name_contains'  
						    'name_not_contains'  
						    'name_starts_with'  
						    'name_ends_with'  
  
number                      'is'  
						    'is_not'  
						    'less_than'  
						    'greater_than'  
						    'between'  
						    'not_between'  
						    'in'  
  
password                    ** Filtering by this data type field not supported  
  
percent                     'is'  
						    'is_not'  
						    'less_than'  
						    'greater_than'  
						    'between'  
						    'not_between'  
						    'in'  

serializable                ** Filtering by this data type field not supported  
  
status_list                 'is'  
						    'is_not'  

summary						** Filtering by this data type field not supported  
  
system_task_type            ** deprecated in favor of Pipeline Steps which are treated as entity fields
							'is' 
						    'is_not'  
						    'contains'  
						    'not_contains'  
						    'starts_with'  
						    'ends_with'  
						    'in'  
  
tag_list                    'is'  
						    'is_not'  
						    'contains'  
						    'not_contains'  
						    'in'  
						    'name_contains'  
						    'name_not_contains'  
						    'name_starts_with'  
						    'name_ends_with'  
  
text                        'is'  
						    'is_not'  
						    'contains'  
						    'not_contains'  
						    'starts_with'  
						    'ends_with'  
  
timecode                    'is'  
						    'is_not'  
						    'less_than'  
						    'greater_than'  
						    'between'  
						    'not_between'  
						    'in'  
  
url                         (*) Filtering by this data type field is not supported