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

PowerApps - Embed - get context

I want to embed PowerApps on SharePoint pages and do so - iframe.
BUT my powerapps don't know where it is (URL, context).
Is there any other way to embed powerApps on a page? I need to capture the context and operate on lists and libraries on this basis.

1 ACCEPTED SOLUTION

Accepted Solutions
Dual Super User
Dual Super User

Re: PowerApps - Embed - get context

Take a look at the following article on how to embed a PowerApp on a page with a Query string.

https://www.c-sharpcorner.com/blogs/powerapps-app-on-sharepoint-modern-page-with-query-string-param



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

6 REPLIES 6
Dual Super User
Dual Super User

Re: PowerApps - Embed - get context

Not sure if this will help with capturing the context, but you can also embed a Canvas PowerApp in a Modern SharePoint page using an SPFX web part.  This is not an IFrame.  The PowerApp actually runs in the context of the page.  You can read about it here:

https://support.office.com/en-us/article/use-the-powerapps-web-part-6285f05e-e441-408a-99d7-aa688195...



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Community Support Team
Community Support Team

Re: PowerApps - Embed - get context

Hi @KrzysiekOle ,

Could you please share a bit more about your issue?

What do you mean about "my powerapps don't know where it is (URL, context)"?

 

More details about embedding a canvas app within a SP Online Site page, please check the following article:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/embed-apps-dev#embed-your-app-in-a-webs...

 

You could also add a "Microsoft PowerApps" web part (rather than <Iframe> web part) within your Site Page as below:6.JPG

Then within right Pop-up panel, fill the Web Url link or App Id of your canvas app as below:7.JPG

 

More details about getting App Web Url or App Id, please check the following screenshot:8.JPG

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
KrzysiekOle
Level: Powered On

Re: PowerApps - Embed - get context

The vision of the project is therefore extensive.
PowerApps is to be placed on all project (pwa) pages using powershell (webpart / iframe ... I don't know yet - that's an idea).
PowerApps must know on which page the project is located (url, project name). Flow connected to powerapps is to copy some selected files from one permanent place to the library in a SPECIFIC project and specific library, so the knowledge of "where is" can possibly be obtained by Flow.
In Flow, I have a REST query that copies data

sites/@{variables('siteTarget')}/_api/web/getFileByServerRelativeUrl('@{variables('tmpTargetUrl')}')/copyto(strnewurl='@{variables('tmpDestinationUrl')}',boverwrite=true)

tmpTargetUrl = /sites/{projektName}/DestinationFolder/

I hope I have understood this clearly.


Thanks for every idea.

Community Support Team
Community Support Team

Re: PowerApps - Embed - get context

Hi @KrzysiekOle ,

I agree with your thought. If you want to retrieve the location info (url, project name) of a pwa project within a PowerApps app, I afraid that there is no way to achieve your needs currently.

 

As an alternative solution, I think you could consider add a Flow connection in your app, fire the flow from your app to get the related location info (url, project name) of a pwa project, then return back to your app, so you could use these location info within your app.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
KrzysiekOle
Level: Powered On

Re: PowerApps - Embed - get context

Can you explain a bit about the alternative path?

I do not see in the flow of action ready to get such information (current url, current project name). Something like

 

_spPageContextInfo.webServerRelativeUrl

would save me.

Dual Super User
Dual Super User

Re: PowerApps - Embed - get context

Take a look at the following article on how to embed a PowerApp on a page with a Query string.

https://www.c-sharpcorner.com/blogs/powerapps-app-on-sharepoint-modern-page-with-query-string-param



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

Power Apps Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (5,244)