form_readsql

With this event the user can modify a query linked to a form. The query is saved in the variable "SYS_SQL"

 

Examples:

 

1. Define a new query for any form.
Attention: The definition should match the form definition!

 

global function form_readsql
//We define a complete new query

setvar=sys_sql=select XXXXXX
end global

 

2. Show information filtered in the Operation Catalog to display only Operations with AG_ID = '1'

 

global function form_readsql
//We change the query, we do the trick to find the string "ORDER BY" and before we add the additional filter

tools=globalreplace=sys_sql=ORDER BY= and AG_ID = '1' ORDER BY
end global