Use of sc_redirect between button code

Hi all,

I need to insert a sc_redir to a grid application to show data of a table .
I’m wondering, if I insert the macro command within a button connected code , if SC once shown the grid and close the grid come back to next code line (i.e. line code…03) .

line code…01
line code…02

sc_redir(grid.php)

line code…03
line code…04

Many thanks

sc_redir physically changes the flow of your application to another application, so no code will be executed after sc_redir. That’s why you need to do a commit transaction if you use it in database events.

Hi Albert,

thanks,
so what do you suggest instead of ?
I need to show a table content (it’s a table that show the content of an uploaded file from a csv file copy into a table to ask to user if all OK or not) and then carry on with code after .
The after code is to upload that table into the final destination table.

[QUOTE=giovannino;21183]Hi Albert,

thanks,
so what do you suggest instead of ?
I need to show a table content (it’s a table that show the content of an uploaded file from a csv file copy into a table to ask to user if all OK or not) and then carry on with code after .
The after code is to upload that table into the final destination table.[/QUOTE]

There are several solutions for that. One might be to use a destination field. I.e. you redir to somewhere but fill a destination app so that the called application knows where to redir after processing. If you keep track of the status you can decide what to do when the application goes into the onscriptinit.