Scroll

Global Event: OnFilterSqlStatementConstructed

The OnFilterSqlStatementConstructed Event occurs just before SQL is sent to the Data Source to retrieve data to populate the filter dropdown menu of Exago. This Event could be used to inspect, log or modify the SQL that is being used to populate the filter dropdown menu.

Signature

For custom code the args array is structured as follows:

args[] contains a string representing the filter SQL in position zero.

For .Net Assmblies the method signature is as follows:

string EventHandlerName(SessionInfo sessionInfo, string filtersSql, SqlObject sqlObject)

Expected Return

The OnFilterSqlStatementConstructed Event expects a string to be returned.

Note

This Event will provide the SQL for the Filter Dropdown Object if that feature is being utilized. See Data Objects for more information on Filter Dropdown Objects

Example

The following example shows how the filter dropdown SQL can be modified to provide the top 200 results instead of the top 100.

//this code example assumes SQL Server as a Data Source
string sql = args[0].ToString();
string newSql = sql.Replace(“Top 100” , “Top 200”);
return newSql;

 


Hidden Article Information

Article Author
Exago Development
created 2017-02-21 15:55:13 UTC
updated 2017-06-27 14:38:46 UTC

Labels
Server Events, sql objects, event handlers, list of server events, filter, filtersqlstatementconstructed, filtersqlconstructed, sqlconstructed, statement, constructed, sql, filter menu,
Have more questions? Submit a request