This article applies to the Admin Console > Extensions > Filter Functions settings.
Custom Filter Functions provide the ability to make functions that will dynamically calculate a value for a filter using high level code.
Filter Functions can be written in C#, JavaScript, or VB.NET. Filter Functions written in C# and VB.NET can get and set elements from the current session of Exago, such as Parameter values. See Exago Session Info for more information.
To add a new custom filter function click Extensions > Filter Functions in the Main Menu and either:
click the Add icon at the top of the main menu
right-click and select Add from the context menu
To edit a function either:
double click it
select it and click the Edit icon at the top of the main menu
right-click it and select Edit from the context menu
To delete an object either:
select it and click the Delete icon at the top of the main menu
right-click it and select Delete from the context menu
To restore the default custom filter functions that come with the application either:
right-click Extensions > Filter Functions in the Main Menu and select Restore All Default Date Filter Functions from the context menu
navigate to General > Filter Settings > Restore All Default Date Filter Functions and click on the Restore button.
To save changes and new functions click the Apply or Okay buttons
Custom Filter Function Properties
Each Custom Filter Function has the following properties:
Name
A name for the filter function that will be displayed to the end users. Required.
Description
A description of the function.
Note
To support multi-language functionality, if the filter function’s name or description can be prepended with _wrFunctionId. If this ID matches the ID of any element in the language files, then the string of that language element will be displayed to the user instead of the function name/description in the Admin Console. For more information see Multi-Language Support.
Filter Type
Determines the data type that the filter function should be available for. Either Date, String, Integer or Decimal.
List Order
The order the filter function will appear among other filter functions of the same type. Functions with a lower number will appear higher on the list. If two functions have the same list value they will display in alphabetic order.
Note
All of the built in filter functions start with list value 100 or greater.
Language
The high-level language of the code for the date function. May be C#, JavaScript, or VB.NET.
References
A semicolon-separated list of any DLLs that need to be referenced by the Custom Filter Function. The DLLs must be present in the \bin folder of the Exago Web Application, Scheduler Services, and the Web Service API if applicable. This folder can be found in the installation directory of the respective component.
Note
System.dll does not need to be listed as a reference as it is already available.
Namespaces
A semicolon-separated list of any namespaces that need to be referenced by the Custom Filter Function.
Program Code
The program code for your Custom Filter Function. The code must return the data type that was set in the Filter Type setting.
Note
Parameters may be referenced within custom functions by placing their name between @’s. For example, @userId@.
Click the Test custom code execution icon to verify that the code properly compiles.
Default Custom Filter Functions v2016.3+
Exago comes with a number of built-in custom filter functions. They are exposed in the Admin Console so they may be modified as needed.
Note
If these functions are unavailable, such as after an upgrade, follow the restore instructions in the Create, Edit, Delete, Restore Custom Filter Functions section above to add them back to the configuration automatically.
In all of the examples below, today's date is assumed to be Friday, February 26, 2021.
FirstDayOfCurrentMonth
Description
Returns a DateTime representing the first day of the current month
Example
2/1/2021
FirstDayOfCurrentQuarter
Description
Returns a DateTime representing the first day of the current quarter
Example
1/1/2021
FirstDayOfCurrentYear
Description
Returns a DateTime representing the first day of the current year
Example
1/1/2021
FirstDayOfLastMonth
Description
Returns a DateTime representing the first day of last month
Example
1/1/2021
FirstDayOfLastQuarter
Description
Returns a DateTime representing the first day of last quarter
Example
10/1/2020
FirstDayOfLastYear
Description
Returns a DateTime representing the first day of last year
Example
1/1/2020
FirstDayOfNextMonth
Description
Returns a DateTime representing the first day of next month
Example
3/1/2021
FirstDayOfNextQuarter
Description
Returns a DateTime representing the first day of next quarter
Example
4/1/2021
FirstDayOfNextYear
Description
Returns a DateTime representing the first day of next year
Example
1/1/2022
FridayOfCurrentWeek
Description
Returns a DateTime representing the Friday of the current week
Example
2/26/2021
FridayOfLastWeek
Description
Returns a DateTime representing the Friday of the previous week
Example
2/19/2021
FridayOfNextWeek
Description
Returns a DateTime representing the Friday of the next week
Example
3/5/2021
LastDayOfCurrentMonth
Description
Returns a DateTime representing the last day of the current month
Example
2/28/2021
LastDayOfCurrentQuarter
Description
Returns a DateTime representing the last day of the current quarter
Example
3/31/2021
LastDayOfCurrentYear
Description
Returns a DateTime representing the last day of the current year
Example
12/31/2021
LastDayOfLastMonth
Description
Returns a DateTime representing the last day of the previous month
Example
1/31/2021
LastDayOfLastQuarter
Description
Returns a DateTime representing the last day of the previous quarter
Example
12/31/2020
LastDayOfLastYear
Description
Returns a DateTime representing the last day of the previous year
Example
12/31/2020
LastDayOfNextMonth
Description
Returns a DateTime representing the last day of the next month
Example
3/31/2021
LastDayOfNextQuarter
Description
Returns a DateTime representing the last day of the next quarter
Example
6/30/2021
LastDayOfNextYear
Description
Returns a DateTime representing the last day of next year
Example
12/31/2022
MondayOfCurrentWeek
Description
Returns a DateTime representing Monday of the current week
Example
2/22/2021
MondayOfLastWeek
Description
Returns a DateTime representing Monday of the previous week
Example
2/15/2021
MondayOfNextWeek
Description
Returns a DateTime representing Monday of the next week
Example
3/1/2021
Today
Description
Returns a DateTime representing today's date
Example
2/26/2021
TodayMinus30Days
Description
Returns a DateTime representing the date 30 days prior to today
Example
1/27/2021
TodayMinus60Days
Description
Returns a DateTime representing the date 60 days prior to today
Example
12/28/2020
TodayMinus7Days
Description
Returns a DateTime representing the date 7 days prior to today
Example
2/19/2021
TodayMinus90Days
Description
Returns a DateTime representing the date 90 days prior to today
Example
11/28/2020
TodayPlus30Days
Description
Returns a DateTime representing the date 30 days in the future from today
Example
3/28/2021
TodayPlus60Days
Description
Returns a DateTime representing the date 60 days in the future from today
Example
4/27/2021
TodayPlus7Days
Description
Returns a DateTime representing the date 7 days in the future from today
Example
3/5/2021
TodayPlus90Days
Description
Returns a DateTime representing the date 90 days in the future from today
Example
5/27/2021
Tomorrow
Description
Returns a DateTime representing tomorrow's date
Example
2/27/2021
Yesterday
Description
Returns a DateTime representing yesterday's date
Example
2/25/2021
Hidden Article Information
Article Author Alexander Agoado created 2015-12-30 17:40:41 UTC updated 2021-02-26 16:34:12 UTC