cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Pass Parameters in iframe embedded powerapp (sharepoint)

Is it possible to pass parameters in the URL/iframe code to get you to a certain screen when embedding the powerapp in SharePoint as an iframe. I have seen options similar to this with PowerBI (https://docs.microsoft.com/en-us/power-bi/report-server/quickstart-embed).  And i know that you can pass parameters to the powerapp to get you to a certain screen say when you click on a push notification to get you to a specific location in the App.  

 

I have used this link to successfully embed the PowerApp and at the bottom it mentions the param function which i am hoping can be pair with the iframe link to achieve what i am looking for (https://wonderlaura.com/2017/04/27/embed-powerapps-on-sharepoint-modern-pages/).  Again i know its possible to "deep link" with the param function as i have done this with a push notification and the param function, but my specific scenario requires me to embed an app on multiple different sharepoint sites and get to a specific screen in the app based on the site it is embedded in. Any assistance or possible "hacks" if necessary would be greatly appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions
PowerApps Staff cherie
PowerApps Staff

Re: Pass Parameters in iframe embedded powerapp (sharepoint)

You could try this:

 

Filter('[dbo].[Location]', Coalesce(Param("AcquisitionID"), ACQ_Gallery.Selected.AcquisitionID) = AcquisitionID)

 

And if you add &AcquisitionID={acquisitionid to filter with} to your url, it should use that instead of the gallery selected one.

View solution in original post

17 REPLIES 17
PowerApps Staff cherie
PowerApps Staff

Re: Pass Parameters in iframe embedded powerapp (sharepoint)

Hi,

 

Are you embedding this app in sharepoint using <iframe src=> or via the PowerApps customization that we have for sharepoint?

 

Thanks

Cherie

Anonymous
Not applicable

Re: Pass Parameters in iframe embedded powerapp (sharepoint)

I am currently using the iframe method to embed the app. Are you referring to a true integration with sharepoint or simply powerapps forms for sharepoint.  I cannot use the powerapps forms for sharepoint, i need to embed the full application which can also be launched via in the powerapps mobile application inside of a sharepoint page.

PowerApps Staff cherie
PowerApps Staff

Re: Pass Parameters in iframe embedded powerapp (sharepoint)

You can just add your parameters to the url you iframe in this case.

 

Example:

 

If you have your app navigate to the screen based on whatever is in Param("screen")

 

Then you can embed in to your sharepoint site the following

<iframe src="https://web.powerapps.com/webplayer/iframeapp?appId={replace all this with what app id you want}&screen={replace with screen to navigate to} />

 

Thanks

Anonymous
Not applicable

Re: Pass Parameters in iframe embedded powerapp (sharepoint)

i need to navigate to a screen and filter the resulting gallery on said screen.  Typically i filter this gallery based on the selectoin from the previous screens gallery (Which i would be bypassing with this).  Is there a way for me to get to the selected screen and satisfy the following filter i have on the resulting screens gallery:

 

 

Current filter on the gallery on the screen i want to get to directly from the embedded app:

Filter('[dbo].[Location]',ACQ_Gallery.Selected.AcquisitionID = AcquisitionID)

 

how can satisfy this requirement? thanks!

 

 

PowerApps Staff cherie
PowerApps Staff

Re: Pass Parameters in iframe embedded powerapp (sharepoint)

You could try this:

 

Filter('[dbo].[Location]', Coalesce(Param("AcquisitionID"), ACQ_Gallery.Selected.AcquisitionID) = AcquisitionID)

 

And if you add &AcquisitionID={acquisitionid to filter with} to your url, it should use that instead of the gallery selected one.

View solution in original post

Anonymous
Not applicable

Re: Pass Parameters in iframe embedded powerapp (sharepoint)

This has definitely lead me down the right road, i ended up creating a splash screen which checks to see if the parameter is blank, if it is it proceeds to the default screen. If it is not it navigates to a subscreen and passes through the variable "loc" where i then use your coalesce method to determine once again if this variable is blank and if not it uses that as the locationid

 

URL I pass through:

<iframe width="1024px" height="768px" src="https://web.powerapps.com/webplayer/iframeapp?source=iframe&amp;screenColor=rgba(104,101,171,1)&amp;appId=/providers/Microsoft.PowerApps/apps/[App GUID]&amp;LocationID=[Location GUID]"></iframe>

 

From splashscreen control i add a timer control and "OnTimeEnd":

If(Not(IsBlank(Param("LocationID"))),Navigate(SUM_Screen,ScreenTransition.Cover,{loc:Param("LocationID")}),Navigate(ACQ_Screen,ScreenTransition.Cover))

 

Then on the destination screen i filter the gallery as below:

SortByColumns(Filter('[dbo].[SummaryTask]', Coalesce(loc, LOC_Gallery.Selected.LocationID) = LocationID), "SortOrder")

 

One final question i have is what are the correct dimensions for a "Portrait" powerapp.  when creating a landscape i can change between different preferred resolutions and it actually tells me what they are.  for portrait i am having a hard time finding the correct setting for height and width, or at least the ratio of the two. 

 

 

Anonymous
Not applicable

Re: Pass Parameters in iframe embedded powerapp (sharepoint)

A follow up... it appears that certain browsers block loading the parameters into the app. It working in IE.  Only works in chrome and firefox when in "edit mode" on the sharepoint page, once you publish it does not. And in edge it doesnt work at all. Any advice on this.

PowerApps Staff cherie
PowerApps Staff

Re: Pass Parameters in iframe embedded powerapp (sharepoint)

Hi,

 

Do you think you could explain what you mean by once you publish?

 

Thanks

Cherie

Highlighted
searope
Level: Powered On

Re: Pass Parameters in iframe embedded powerapp (sharepoint)

I've just bumped into the same issue. I cannot have an embedded PowerApp on a modern Sharepoint (communication site). Once I add a parameter the app does not appear on a page at all. (( Without it, the app works just fine.

I've tried all the browsers and it seems to be not a browser specific.

Helpful resources

Announcements
thirdimage

Power Automate 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

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (4,849)