cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
KrzysiekOle
Frequent Visitor

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
Pstork1
Dual Super User III
Dual Super User III

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
Pstork1
Dual Super User III
Dual Super User III

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.
v-xida-msft
Community Support
Community Support

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.

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.

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.

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.

Pstork1
Dual Super User III
Dual Super User III

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
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza Winner Announcement

Please join us on Wednesday, July 21st at 8a PDT. We will be announcing the Winners of the Demo Extravaganza!

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (4,096)