Custom Filter Functions
This topic 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 BI, such as Parameter values. See SessionInfo for more information.
Create, Edit, Delete, Restore Custom Filter Functions
- 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.
To support multi-language functionality, you can supply an Id from a language file instead of a static string. For more information, see Multi-Language Support.
Description
A description of the function.
To support multi-language functionality, you can supply an Id from a language file instead of a static string. 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.
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 BI Web Application, Scheduler Services, and the Web Service API if applicable. This folder can be found in the installation directory of the respective component.
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 the Custom Filter Function. The code must return the data type that was set in the Filter Type setting.
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+
See Default Custom Filter Functions v2016.3+
Additional Resources
- Default Custom Filter Functions v2016.3+
- Admin Support Lab — Custom Filter Functions (video)