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.
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)
The OnFilterSqlStatementConstructed Event expects a string to be returned.
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
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.ToString(); string newSql = sql.Replace(“Top 100” , “Top 200”); return newSql;