### Manual Filter

Manual filter allows you to create filtering expressions with C# LINQ. This filter is mainly used to create conditions which are dependant on current date.
Example 1. All tasks with file attachments:

TaskFiles.Any( )

Example 2. Show all tickets, with additional string field with Id = 9 contains substring "test":

TaskAdditionalFields.Any(FieldId==9&&Value.Contains("test") )

Example 3. Show all tickets, with additional selected field with Id = 10 has value with Id = 151:

TaskAdditionalFields.Any( FieldId==10 && Value == "151" )

Example 4. Show all tickets, with additional selected field with Id = 10 has value with Id = 151 or 152 and integer field with Id = 15 more then 100 :

TaskAdditionalFields.Any( FieldId==10 && ( Value == "151" || Value == "152")) && TaskAdditionalFields.Any( FieldId==15 && Convert.ToInt32(Value) > 100 )

#### Allowed fields to filter by:

- Deadline (DateTime?)
- Created (DateTime)
- Changed (DateTime?)
- ReactionDate (DateTime?)
- Closed (DateTime?)
- LastStatusChangedDate (DateTime?)
- CompletionStatus (int?)
- Hours (decimal?)
- Price (decimal?)

#### Additional macros:

There are macros that replace the most commonly used search expressions. Macros are entered in the following format:

[Field type].[Time span]

Example 5. Show all tickets, created within last month:

TaskCreationDate.LastMonth

The following types of fields names:

- TaskDeadlineDate (Deadline)
- TaskCreationDate (Created)
- TaskChangedDate (Changed)
- TaskReactionDate (ReactionDate)
- TaskClosedDate (Closed)
- TaskLastStatusChangedDate (LastStatusChangedDate)
- TaskExpensesDate (ExpensesDate<)

Available next time range:

- Yesterday
- Today
- LastWeek
- LastMonth
- LastYear
- CurrWeek
- CurrMonth
- CurrYear