![scriptcase grid events scriptcase grid events](https://www.scriptcase.net/tutorials/wordpress/wp-content/uploads/2020/12/05_calendar-1024x576.png)
Īnd on the detail, we have only the records that have the same key, and we use d the macro sc_apl_conf to configure the application to show only one record, will be this:Īnother example of using the macros sc_redir and sc_apl_confīoth macro sc_redir and sc_apl_conf, have other features besides those that we've mentioned before. On the form, we will select a record, verify the primary key, and hit the button to redirect the detail that we did. Now we will use the macro sc_apl_conf to provide only 1 record per page o n the grid, if it have 2 or more records. Now the redirection button is done, we have to configure the receipt of the redirect parameter on the grid, on the “SQL” option on Scriptcase, and we will do a where and declare the variable with the redir made on the form, which was transformed into a global variable. Initially we will have a button to redirect the form to the grid, with the parameter passing the orderid field. As an example, we use the table order (for the form) and order_detail (for the grid), making a sc_redir on the form, passing the primary key as a parameter and sending for the detail, that it's configured with sc_apl_conf macro that will display only 1 record per page.
![scriptcase grid events scriptcase grid events](https://computermalaysia.com.my/media/catalog/product/cache/1/thumbnail/500x500/9df78eab33525d08d6e5fb8d27136e95/s/c/scriptcase-starter.jpg)
In this tutorial, we will demonstrate the use of macro sc_redir and we will also use the macro sc_apl_conf.