web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Launch several URLs in...
Power Apps
Unanswered

Launch several URLs in one click

(1) ShareShare
ReportReport
Posted on by Microsoft Employee

I would like to create a button, which opens several URLs in different tabs onSelect.

I do that like this:

Launch("https://www.bing.com", {}, LaunchTarget.Blank);

Launch("https://www.google.com", {}, LaunchTarget.Blank)

 

Somehow only the first URL opens, then it seems to stop.

What do I do wrong here?

Thank you

Roger

Categories:
I have the same question (0)
  • v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @rogerh ,


    Yes, the launch function can only be triggered once on one button.

    As an alternative workaround, put two launch code to two button, and add the third button to select them.

    1. BingButton.OnSelect:  Launch("https://www.bing.com", {}, LaunchTarget.Blank)

    2. GoogleButton.OnSelect:  Launch("https://www.google.com", {}, LaunchTarget.Blank)

    3. The Button3.OnSelect: Select(BingButton);Select(GoogleButton)

    Snipaste_2020-05-14_10-39-11.png

    Note: you can set two button to be invisible if they are not needed.

    Sik

  • rogerh Profile Picture
    Microsoft Employee on at

    Hi @v-siky-msft ,

    I tried that beforehand. I have the buttons anyway but want to implement a shortcut for the user (we have about 12 different sites to open and it would be convenient - if needed - to do it in one go).

    However, the result is exactly the same. The first website gets opened, the rest not. I

    Roger

  • v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @rogerh ,

     

    It's weird that when I try the following code again, it manages to open two separate windows.

    Launch("https://www.bing.com", {}, LaunchTarget.Blank);Launch("https://www.google.com", {}, LaunchTarget.Blank)

    The LaunchTarget argument is currently in Preview, and the LaunchTarget enum names are in transition. I am not sure if this is the if this is the problem, but I suggest you switch browsers and create a new app to try again to see if it works well.

    Reference: https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-param#target 

    Sik

  • rogerh Profile Picture
    Microsoft Employee on at

    Hi @v-siky-msft 

    That's now really, really strange. 

    I tried calling Select to two buttons, only the first one is displayed,

    I called Launch (as you did below) form one button, only the first is displayed

     

    I tried Edge and Chrome - still the same. 

    So somehow we seem to have different results with the same code

    Roger

  • v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @rogerh ,

     

    It may not work as expected since it was just completed few days ago and still in Preview stage.

    I found a suggestion that You cant leave the second parameter blank, not even fill it with some parameter in double quotes, you have to use the curly braces format and fill it with something, blank object doesn't work as well. So this works for me and doesn't break anything from here 

    So please try this to see if it can open two separate windows:

    Launch("https://www.bing.com", {q:"1"}, LaunchTarget.Blank);Launch("https://www.google.com", {q:"1"}, LaunchTarget.Blank)

    Hope this helps.

    Sik

  • rogerh Profile Picture
    Microsoft Employee on at

    Hi @v-siky-msft 

    thank you for investing the time!

    Basically the launch by itself works. But whatever I do, only the first tab loads...

    Roger

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @rogerh,

     

    Not sure whether this problem has been solved but I found a way to do this. I also was facing the same issue and wanted to open multiple links on different tabs at the click of a single button. Below is a sample of the code I used for the same:


    ClearCollect(colLinks, "www.google.com");
    Collect(colLinks, "www.bing.com");
    ForAll(colLinks,Launch(colLinks[@Value],{},LaunchTarget.New))

     

    tanmay0304_2-1652433516681.png


    Hope this helps.

    Tanmay

  • andywweaver Profile Picture
    14 on at

    Hey! @rogerh I know it's been some time since you asked this question but I was able to find a workaround using your original formula! It is not a Power Apps issue, just a browser issue. I could not get multiple websites to open until I had allowed pop-ups for the site. In case you are still looking for the solution 2 years later haha! Hopefully, this helps!

  • rogerh Profile Picture
    Microsoft Employee on at

    Hi @andywweaver , actually I gave up in the end but thank you for letting me know. If I need it again, I will try

    Roger

  • andywweaver Profile Picture
    14 on at

    This may have something to do with your browser blocking Pop-ups and redirects!

     

    To allow pop-ups and redirects, in chrome, go to Settings/Privacy and Security/Site Settings/Pop-ups and redirects then you can add apps.powerapps.com to the list of allowed sites for Pop-ups and redirects

     

    I needed a similar function and this is what was preventing me. This will work properly if you allow Power Apps to open pop ups combined with the function:

     

    Launch("google.com",{},LaunchTarget.New); Launch("bing.com",{},LaunchTarget.New)

     

    When Power Apps first launches a website by default it opens a new tab. If you leave that tab open, any other launches from power apps will launch in the tab Power Apps has already opened. So when you launch multiple websites, it will technically launch all of them it will just land you on the last website in your chain of launch functions as it opens all of them in the same tab sequentially. That is why LaunchTarget.New is needed

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 326 Most Valuable Professional

#2
11manish Profile Picture

11manish 168

#3
sannavajjala87 Profile Picture

sannavajjala87 75 Super User 2026 Season 1

Last 30 days Overall leaderboard