Sc_commit_trans() multiple updates

Hello forum,

I’m creating a multiple forms application. I want to select which records I update, commit these and then redirect. Everything works except that only one record gets updated at a time before the redirect instead of all the records I select.

Is there a way to make all the records update before I redirect?
Like counting which checkboxes are checked?

Thanks in advance!

I fixed it.

I put sc_begin_trans() in onbeforeupdate. In onafterupdateall I put sc_commit_trans() and sc_redir(). It now updates all the records before redirecting to the next page.

Hope I help someone with this in the future :).

Perhaps a bit clarification. If you generate an update application then you follow the flow of a scriptcase application. Events go off and the begin update and commit are generated automatically. The commit is generated at the end of the application. So if you do a sc_redir somewhere in between then the commit will not be executed because sc_redir is not a subroutine like in a traditional programming environment. Therefore, if you are in any transaction and you want to do a sc_redir then you simply must do a sc_committrans.