It occurs when the user clicks on the field configured with the event, thus allowing specific actions to be performed after the interaction of the system user.
Among other features, it is possible to create a redirect to other applications with the sc_redir macro, delete records without leaving the query using the sc_exec_sql macro, among other implementations.
----
In the example below, a redirect will be performed using the sc_redir macro sent as a parameter the order number to the ReportPDF, which will show the order details.
In the ReportPDF that uses the orders_detais table, add a where clause in SQL:
WHERE orders.orderid = [order]
In the query, using the orders table, create an onClick event in the field of your choice, and add the command line below.
sc_redir(pdf_name.php, order={orderid}, "_blank");