Wednesday, January 26, 2022

Passing parameters to your Power Apps SharePoint form

Must read

Rik de Koning
My name is Rik de Koning and I work as a Functional Consultant for Portiva, which is one of the larger Office 365 implementation partners in The Netherlands. I started my career in 2011 as a SharePoint support engineer and in 2013, I went to become a SharePoint consultant where I did various projects on SharePoint Server 2010 and SharePoint Server 2013. In the last couple of years I started focusing more and more on Office 365, especially on SharePoint Online, PowerApps and Microsoft Flow. I like being challenged and for PowerApps and Flow being quite new, there are always some challenges when implementing these services. When I’m not working, I like spend some time with my family (girlfriend and son), hang out with friends, do some sports (like fitness, running, kitesurfing and snowboarding) playing videogames and just relax a little. If you have any questions, please do not hesitate to contact me!



We all know that it is possible to pass parameters to your Power Apps canvas apps, right?
But did you know that this is also possible for your Power Apps SharePoint forms?

In this blogpost, I will explain you how to do this.

For those of you who haven’t played with parameters before, let me explain this shortly.
You can define parameters in your Power App by using the Param() function. You can then use this parameter in the URL of your Power App to use it, like this:<APP_ID>?<PARAMETER>=<VALUE>

I’ve created a simple Canvas App to demonstrate this.
The Power App has a single label control that has its Text attribute set to Param(“parameter”), meaning I’m using a parameter called ‘parameter’ inside this app.

When I run this app without any parameters passed through the URL, I will just get a blank screen:

But when I pass the parameter, it will show up inside the label:

Please note that any parameter passed through is always a string. So if you want to pass through an integer, you need to convert the string to an integer using the Value() function:


Now that we know the basics of a parameter, we can proceed by passing it to our Power Apps SharePoint form.

The first thing you need to know is that you cannot pass parameters to the NewForm.aspx, EditForm.aspx and ViewForm.aspx forms inside SharePoint. The only way to do this is by using the URL of the Power App. But how do you know this URL? Your Power App forms do not show up in your App overview on

The second thing you need to know is that when you do not load your Power App SharePoint form directly from SharePoint, your SharePointIntegration will not work and thus cannot use this directly for editing and viewing an item. You also need to configure a custom Save button, because the default Save and Cancel buttons will also not be loaded.

Getting your Power Apps SharePoint form URL

Actually, that’s pretty easy. A Power App always has an App ID. With this ID, you can use the URL as stated above (with or without parameters). For a canvas app, you can find this ID by simply going to the detail page of your app.
To find the App ID of your Power App form, you need to dig a little deeper:

  1. Go to your SharePoint list
  2. Enter list settings
  3. Go to Form settings
  4. Make sure that Power Apps is selected as your form handler and click on See versions and usage

  5. You will now be redirected to where you can find the App ID:

With this App ID, you can now put together the App URL of your Power Apps form.

Loading a specific item into your Power App form

When you open the URL you just put together, your Power Apps form will load, but is not related to any item inside your list. That’s why we always need to configure a parameter that contains the item ID so that we can load the corresponding item into the form by tweaking the Items attribute of your form a bit:

        ID = Value(Param("ID"))

If your ID parameter hasn’t been passed, the default SharePointIntegration will be used for loading your item. If the ID parameter has been passed through, a lookup to your list will take place using the ID parameter (converted from string to integer)

Using parameters in your DataCard

Now that we can load an item into our form, we can pass another parameter to be used for a specific SharePoint field in your form.
This can be done by changing the Default attribute of your DataCard to the following:


If your ID parameter hasn’t been passed, the default value from the SharePoint field will be used. If the ID parameter has been passed through, the value of the “parameter” parameter will be used as a default value.

You can use as many parameters as you want. Be sure to separate them in the URL by using an ampersand (&) symbol and try to avoid special characters as your parameter value because that may break your Power App.

Saving items back to SharePoint

Your Power App also doesn’t contain the Save and Cancel button you are used to when you load your form directly from within SharePoint, so you need to add them as well and provide them with the correct OnSelect properties:





Please note that RequestHide() functions will not work either, so if you want your form to be closed after Saving or Cancelling, you may want to add an Exit() or even a Launch() function.

Hiding the Office suite bar

By default, the Office suite bar is loaded on top of your Power App. You can disable this by adding ?HideNavBar=true to your URL. Make sure to add the first parameter using the ampersand symbol after that!

More articles

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Latest articles