FilterDefinition

A single filter definition.

More info: see the get operation and the filter definitions endpoint.

Fields

FieldDescription
id
int 
(required)

Unique ID

Example value:123
typeid
int 
(required)

Type ID

Example value:10001
checklistquery
string 
(required)

For certain filter types, the user must select a value from a list. The checklistquery contains the sql clause to retrieve the list of available values.

Example value:"select id as ListBoxValue,name{0} as ListBoxDisplay from tm.saleschannel where isarchived is distinct from true order by name{0}"
description
mlstring 
(required)

Name for the filter

Example value:"Sales channel"
filtertype
int 
(required)

The type of filter definition defines the UI and resulting parameters that will be used when a user selects the filter. The possible values can be found here.

Example value:2
sqlclause
string 
(required)

The sql clause that defines how the filter will work

Example value:"select id from tm.order where saleschannelid in ({0})"
isarchived
bool 
(required)

Whether or not this item is archived

createdts
timestamp 
(required)

Created timestamp

Example value:"2014-09-26 15:24:36"
lastupdatets
timestamp 
(required)

Last updated timestamp

Example value:"2014-09-26 15:24:36"

Example

 1{
 2    "id": 123,
 3    "typeid": 10001,
 4    "checklistquery": "select id as ListBoxValue,name{0} as ListBoxDisplay from tm.saleschannel where isarchived is distinct from true order by name{0}",
 5    "description": "Sales channel",
 6    "filtertype": 2,
 7    "sqlclause": "select id from tm.order where saleschannelid in ({0})",
 8    "isarchived": false,
 9    "createdts": "2014-09-26 15:24:36",
10    "lastupdatets": "2014-09-26 15:24:36"
11}