After downloading file navigate to other screen

After downloading file navigate to other screen


Hi Outsystems Community :),

The download of the Excel is already activated by clicking on another button by the widget Widget_Click.

So what I've tried is to do the same within this Widget_Click action.

But that didn't work.

I want to get navigated to another screen after downloading a document.

Some of you that got experience on this problem?

Hi Stan.

What's the method you're using in your link/button?It should be Submit, and it seems you're using Navigate or you're getting an error and being redirected to another page defined on your error handling flow.

I would need more information to be sure, but for now, you can check those things I mentioned.

Hi Stan,

From what I understand you already have a button bound to an action (1st action) that does a Widget_Click on another button. This other button is bound to an action (2nd action) that will do the download.

If that is the case, what I think you need is to run some javascript in the 1st action besides the Widget_Click. The action should thus be like this:

The javascript inside of it should be something like this:

"setTimeout(function (){
        window.location.pathname = 
             '" + EncodeJavaScript(GetEntryURL("AnotherScreen", GetEntryEspaceName()))+ "';
}, 2000);"

This will start the download and redirects to another screen after some time.

See if that works.




Ok, I already had a solution sorry for not uploading.

What i did wrong was that I put the hidden butten into a container and named that container. So I then named my button and selected my button.Id instead of the container.

Rookie mistake.