[S]Call a modal app from a form, and refresh the calling form after modal app closed?

Apologies - originally posted this in “discussion” in error - so duplicated it here - perhaps a moderator can delete the “discussion” version please? :slight_smile:

===================

I have a form (single record) that has a button that calls a control app modally. When the modal app is closed I want the calling form to refresh to reflect that changes the modal app made. Everything works fine except for the refresh after closing. How can I achieve this?

The button that calls the control app modally is a Link button.

I have also tried using a PHP button (instead of a link button) with the following code:

sc_redir('contr_app',,'_modal');

sc_redir('calling_form_app');

That also doesn’t work re the refresh. Firstly, the modal bit doesn’t quite work; opens app but in a new browser window, and the main screen becomes just a menu and background with no app displayed. After after closing the “modal” form" it just closes leaving the blank main screen - so the redir to the calling app doesn’t appear to happen.

Any thoughts folks?

[QUOTE=adz1111;29223]Apologies - originally posted this in “discussion” in error - so duplicated it here - perhaps a moderator can delete the “discussion” version please? :slight_smile:

===================

I have a form (single record) that has a button that calls a control app modally. When the modal app is closed I want the calling form to refresh to reflect that changes the modal app made. Everything works fine except for the refresh after closing. How can I achieve this?

The button that calls the control app modally is a Link button.

I have also tried using a PHP button (instead of a link button) with the following code:

sc_redir('contr_app',,'_modal');

sc_redir('calling_form_app');

That also doesn’t work re the refresh. Firstly, the modal bit doesn’t quite work; opens app but in a new browser window, and the main screen becomes just a menu and background with no app displayed. After after closing the “modal” form" it just closes leaving the blank main screen - so the redir to the calling app doesn’t appear to happen.

Any thoughts folks?[/QUOTE]

You cannot have any code execute after an sc_redir(). It is a one-way path. Consequently, the 2nd line will never be executed.

You need to put the ‘calling_form’ as the exit app for the control form, that way it will get reloaded.

Dave

Thanks Dave.

So obvious! Wood for the trees - but that definitely helped. It’s not entirely what I’m after but I think I can get to where I need to be. So, much appreciated! Thanks

[QUOTE=daveprue;29226]You cannot have any code execute after an sc_redir(). It is a one-way path. Consequently, the 2nd line will never be executed.

You need to put the ‘calling_form’ as the exit app for the control form, that way it will get reloaded.

Dave[/QUOTE]

Thank you for the help Dave.

was just a human error, hehe.

Bye.