cancel
Showing results for 
Search instead for 
Did you mean: 

SharePoint Custom Form - "Param" does not work

The "Param" function DOES NOT WORK on SharePoint custom forms inside of SharePoint itself (which is where they are designed to run!!!!).

 

I created a form, with a custom Data Card with two label controls - one with a Text property set to "ParamValue:", and the other with the "Text" property set to:

Param("Param")

 

Published the form, browsed to my list, and then put a "Param" query string parameter in the URL, like this:

 

https://<tennant>.sharepoint.com/<site>/Lists/<MyList>/AllItems.aspx?Param=Hello

The customized form simply does not retrieve the param value:

 

Param1.PNG

 

Looking at the browser source when I browse to the SharePoint list, I can see that the form is embedded in an iframe.  So I mashed up a URL based in the information I found in browser source, and browsed to the customized form using a similar URL:

 

https://web.powerapps.com/webplayer/app?appId=/providers/Microsoft.PowerApps/apps/<AppIdGoesHer>&Param=Hello

The parameter value was picked up fine:

 

Param2.PNG 

 

This means that if we want to pass information to a PowerApps form from another part of SharePoint (e.g. from a page added to SharePoint or a custom Document Set page), we either have to:

  • Browse to the form using the "web.powerapps.com", by looking at the source of the SharePoint list page to get the App ID.  This will be confusing for the user.
  • Use JavaScript in a ScriptEditor web part to pop up the form in a SharePoint modal dialog using SharePoint's built in javascript, again using the iframe URL.   This works OK, however there's not way to close the dialog from inside PowerApps.  The only thing you can do is create a custom "Submit" button, and then browse to another screen informing the user that their item has been submitted, so that can click the "X" button on the dialog.  Again, not ideal.

Having the "Param" function not work in a SharePoint custom form seems to be a big gaping hole.  Can this be fixed please?

Status: New
Comments
Level: Powered On

Please also see: https://powerusers.microsoft.com/t5/PowerApps-Ideas/SharePoint-quot-New-Item-quot-customized-form-we... - Need the ability to be able to have parameters work inside of SharePoint, whether that be in the PowerApps web part, or as a form that "slides out" anywhere in SharePoint (i.e. not just against a list where the form has been customized!!!)

Level: Power Up

Making the "Custom Form" a Cavas App seems like such over kill.