How is your experience with the OutSystems Community?
21
Views
3
Comments
Solved by AI
New tab navigation using button
Question

Hi,

I need to navigate to a new tab on click of a button. I know we can navigate to new tab using a link, but my requirement is to use a button. My app is reactive so there is no property to set navigate as in web app. 

Thanks,

Gowtham

2023-12-26 10-35-28
OutSystems Neo
Staff
Solution by AI
AI Generated

You can’t directly set target="_blank" on a Button in Reactive, but you can achieve the same behavior with a small Client Action and JavaScript.

Typical approach:

  1. Add a Client Action to your button’s On Click.
  2. Inside that Client Action:
    • Build the URL of the screen/page you want to open (for example using GenerateURL or string concatenation).
    • Add a JavaScript node.
  3. In the JavaScript node, define an input parameter URL (Text), and use:
window.open($parameters.URL, '_blank');

This will open the desired URL in a new browser tab when the button is clicked, while still allowing you to run any logic before opening the tab (calling server actions, preparing data, etc.). open screen redirect from client action in new tab

If your URL needs query parameters or special characters, use EncodeUrl() when building it so it’s properly URL‑encoded. open screen redirect from client action in new tab

This answer was AI-generated. Please read it carefully and use the forums for clarifications
2021-09-06 15-09-53
Dorine Boudry
 
MVP

what do you mean when you say "my requirement is to use a button" ? Does it have to look like a button ? in that case, just style a container in the link.  Or do you mean that you first have to do some logic in a screen action, and only then open a page in anoter tab ?

2026-03-13 15-51-13
Samuel Espinoza

Hey @Gowtham yes as @Dorine Boudry said you can just use a link or a container and style it to look like a button, you will also need to use the "target" "_blank" that way the link will open a new tab instead of redirect like this:Also you can use a button, but you will need to handle the action and inside that action add a JS to open in a new tab


At least that's how I have found that works, you have some more options, but I think these are the easiest unfortunately not using the screen redirect, here are some previous post that I've found with the same topic that might help you too

https://www.outsystems.com/forums/discussion/54897/reactive-app-how-to-open-an-external-site-in-a-new-tab/
And
https://www.outsystems.com/forums/discussion/40272/display-link-in-new-tab-from-client-action/

2023-12-26 10-35-28
OutSystems Neo
Staff
Solution by AI
AI Generated

You can’t directly set target="_blank" on a Button in Reactive, but you can achieve the same behavior with a small Client Action and JavaScript.

Typical approach:

  1. Add a Client Action to your button’s On Click.
  2. Inside that Client Action:
    • Build the URL of the screen/page you want to open (for example using GenerateURL or string concatenation).
    • Add a JavaScript node.
  3. In the JavaScript node, define an input parameter URL (Text), and use:
window.open($parameters.URL, '_blank');

This will open the desired URL in a new browser tab when the button is clicked, while still allowing you to run any logic before opening the tab (calling server actions, preparing data, etc.). open screen redirect from client action in new tab

If your URL needs query parameters or special characters, use EncodeUrl() when building it so it’s properly URL‑encoded. open screen redirect from client action in new tab

This answer was AI-generated. Please read it carefully and use the forums for clarifications
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.