cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
gauthambr
Level: Powered On

URL trigger using button in PowerApps

Hi all,

I need to trigger an URL that I am gonna hardcode using the button in PowerApps currently if I use Launch("https://www.google.com") it is opening a "new tab page in the browser", instead of this functionality - I just want the URL to run in the background without opening it in a new page. Is there a way to implement this case? 

FYI - I am triggering an Azure Functions using the URL - so I donot require it to be opened in a new tab in browser.

1 ACCEPTED SOLUTION

Accepted Solutions
gauthambr
Level: Powered On

Re: URL trigger using button in PowerApps

Great suggestion @RusselThomas ! Will have to try this out. Meanwhile, I have used MS Flow to call out the Azure Functions URL and invoked MS Flow in PowerApps "Button".

SubmitForm(Form3);NewForm(Form3);PowerAppsbutton.Run();PowerBIIntegration.Refresh()

So MS Flow makes the URL to trigger in the backend by using the below function in the OnSelect event,

PowerAppsbutton.Run();

 

View solution in original post

5 REPLIES 5
Microsoft RusselThomas
Microsoft

Re: URL trigger using button in PowerApps

Hi @gauthambr ,

Launch() is interactive, so I don't think it would be easy to get it to run suppressed.

If you have a premium license I'd suggest passing the web call off to Flow in the background.

You can create a PowerApps triggered flow that uses the HTTP/HTTPS function - this way you can use the same flow for different calls.  

It does however carry a licensing implication.

Likewise, you could create a custom API for your azure function and then use the custom connector in PowerApps to execute the function.

Something I can't test as I don't have an API or webhook that would show me whether it works or not, is putting a dynamic URL into an image....So here, I would put an image on the page and set it's Image: property to varURL.  Then set the varURL value to your URL with a button OnSelect:

 

UpdateContext({varURL: "your url here"})

As I say, I can't unfortunately test this so have no clue whether it will work or whether it will throw errors or anything else, but it might attempt to reach the URL which might be enough to execute the webhook, even if it doesn't actually have an image to render.

Hope this helps,

RT

 

Super User
Super User

Re: URL trigger using button in PowerApps

@RusselThomas - the 'image' suggestion is a great idea - very clever!

gauthambr
Level: Powered On

Re: URL trigger using button in PowerApps

Great suggestion @RusselThomas ! Will have to try this out. Meanwhile, I have used MS Flow to call out the Azure Functions URL and invoked MS Flow in PowerApps "Button".

SubmitForm(Form3);NewForm(Form3);PowerAppsbutton.Run();PowerBIIntegration.Refresh()

So MS Flow makes the URL to trigger in the backend by using the below function in the OnSelect event,

PowerAppsbutton.Run();

 

View solution in original post

Highlighted
Microsoft RusselThomas
Microsoft

Re: URL trigger using button in PowerApps

Thanks @timl  - out of curiosity I set up a HTTP Request flow with a GET method to test the theory.  It does indeed work.

I'd be careful employing this method in a production app though, it's likely to be seen as a bug and could stop working without notice.

Kind regards,

RT

Super User
Super User

Re: URL trigger using button in PowerApps

Hi @RusselThomas 

Thanks for testing this theory. Glad to hear it works!

Helpful resources

Announcements
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (8,557)