Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

Has the Launch function stopped working correctly?

Posted on by 38
In my Canvas App, the Launch function that was previously working without issues has suddenly started malfunctioning, even though I haven't changed the source code. Has anyone experienced similar problems? Specifically:
 
1.
OnSelect=Launch("websiteA",{paramA: "parameterA"}, LaunchTarget.New);
correctly displays website A.However,
Launch("websiteA", LaunchTarget.New);UpdateContext({foo:"var"});
Previously, this code would open website A and set the variable as written. Now, website A doesn't open at all.
 
2.
OnSelect=Launch("websiteA", {paramA: "parameterA"},LaunchTarget.New);
                 Launch("websiteB", {paramB: "parameterB"},LaunchTarget.New);
                 Launch("websiteC", {paramC: "parameterC"},LaunchTarget.New);
Previously, this code would open websites A, B, and C in new tabs. Now, only website C opens.
 
Has anyone encountered these issues or knows what might be causing this behavior? Any insights or suggestions would be greatly appreciated.
  • KMmanjuu Profile Picture
    KMmanjuu 38 on at
    Has the Launch function stopped working correctly?
    Hi Nandit,
     
    Yes, it's quite strange and we're often puzzling over those apps' inconsistent behavior...
    Our problematic app is currently being reviewed in detail by a dedicated team from Microsoft. As soon as there is additional information, I will post it here.
     
    Kind Regards,
    KMmanjuu
  • Nandit Profile Picture
    Nandit 1,535 on at
    Has the Launch function stopped working correctly?
     
    This is strange cause when I set it to "Always allow pop-ups..", it was able to open all the URLs in one click. 
     
    Kind regards,
    Nandit
  • KMmanjuu Profile Picture
    KMmanjuu 38 on at
    Has the Launch function stopped working correctly?
    HI Nandit,
     
    Thank you for your suggestion.
     
    I'm afraid that the same issue occurred regardless of whether the LaunchTarget parameter was set or not, so I believe the presence or absence of the LaunchTarget parameter is unrelated to the occurrence of this issue. As for the pop-up blocker, we have confirmed that it is turned off in the browser.
     
    Kind Regards,
    Koichiro
  • KMmanjuu Profile Picture
    KMmanjuu 38 on at
    Has the Launch function stopped working correctly?
     
    Thank you for your suggestion.

    Yes, I suspect that the daily automatic updates to the Power Apps environment in the background are the most likely cause. This is a common issue we encounter with Power Apps. Regarding browsers, we have confirmed that the same issue occurs in at least two browsers, Edge and Chrome. Of course, we have ensured that the pop-up blocker is turned off.
     
    Kind Regards,
    Koichiro
  • KMmanjuu Profile Picture
    KMmanjuu 38 on at
    Has the Launch function stopped working correctly?
     
    Thank you for your suggestion.
     
    #1
    As you expected,
    UpdateContext({varXXXX: 123});Launch("https://google.com")
    works well in my environment. 
    I will reverse the order of all these statements. 
    Thank you!
     
    #2
    I also suspect that changes in the environment are likely the reason why the same source code does not work as expected.
    After reporting this issue to Microsoft’s technical support, they confirmed that the same phenomenon was reproduced in their environment. They are currently investigating the cause of this problem.
     
    Kind Regards,
    Koichiro
  • Suggested answer
    Nandit Profile Picture
    Nandit 1,535 on at
    Has the Launch function stopped working correctly?
     
    For the first example you shared:
    Use the syntax suggested by WarrenBelz as you don't actually need a LaunchTarget.New in the example you shared: Launch("websiteA", LaunchTarget.New);UpdateContext({foo:"var"}). Simply use, Launch("websiteA");UpdateContext({foo:"var"}); this will open your website in a new tab by default. 
     
    For the second one, it will only open the first website because your browser is blocking it. In the URL section of your Browser, you will be able to select the Pop-up option and update it "Always allow pop-ups..". This was you will be able to open all the Websites in one click. 
     
     
    Hope this helps. 
     
    Kind regards, 
    Nandit
     
    If this answers your query, please mark this response as the answer.
    If its helpful, please leave a like. Thanks!
  • ronaldwalcott Profile Picture
    ronaldwalcott 1,026 on at
    Has the Launch function stopped working correctly?
    Has your environment changed? Browser updates, pop up blockers, or such?
  • Verified answer
    WarrenBelz Profile Picture
    WarrenBelz 143,487 on at
    Has the Launch function stopped working correctly?
    #2 has always been the default behaviour to my knowledge and I have answered a number of posts over the years looking for solutions (of which I am not aware of any).
    for #1, I just ran this
    Launch("https://google.com");UpdateContext({varXXXX: 123})
    and it launched the site and set the Variable as expected, so it may be a version issue. Have you considered testing them in reverse order ?
     
    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.
    MVP (Business Applications)     Visit my blog Practical Power Apps    Buy me a coffee

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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,487

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 64,014

Leaderboard