1

Is there a way in SharePoint to use arguments passed to the URL via GET requests as default arguments to a New Item on a List?

I have a list designed to track information about internal metrics. Each metric has a MetricID and will likely have multiple entries on the list. I can link members of my team to the New Item page for this list. However, I would like to be able to pass the MetricID to the New Item form without the team member having to enter it (as this can lead to human error).

I had the idea of using the a GET request, so the URL linked to would be something akin to:

https://{CompanyName}.sharepoint.com/sites/{TeamName}/Lists/MetricTracker/NewForm.aspx?MetricID=AAA001

As I will be sending the links to team members, I believe a GET request attached to the end of the URL would be the simplest way to implement this. However, I'm not completely tied to this strategy and so if I can create a dynamic default value, that would be great!

2
  • Which version of SharePoint are you using? Are you using classic experience or modern experience? Are you trying to populate MetricID field value from value given in URL query string parameter? Commented Nov 1, 2022 at 11:39
  • When I look for the Sharepoint Version, it just says 'SharePoint in Microsoft 365', but I believe this is the modern experience. Yes, I am trying to populate the field value from a URL parameter Commented Nov 1, 2022 at 11:52

1 Answer 1

1

It is not possible to populate field values based on URL query string parameters using SharePoint out of the box capabilities.

You have to customize the list form using Power apps. In Power apps, you can read query string parameters from URL using Param() function.

You have to store this query string parameter value in one variable in OnStart property/event of App object.

Then you can use this variable populate the MetricID field. You have to set the Default property of control based on this value.

You can follow this step by step article for more information: Passing parameters to your Power Apps SharePoint form

Documentation:

  1. Param function in Power Apps

Note: The Param function does not work for SharePoint custom forms directly from SharePoint list since it does not function as a canvas app. So, you will have to browse to the list form using the URL "web.powerapps.com" in order to get the query string.

Similar threads:

  1. How to get Query String Value in Powerapps forms.
  2. Passing a Param object to a SharePoint Power Apps list form and why it doesn’t work

You can vote on this idea to support using Param() function directly from SharePoint list: SharePoint Custom Form - "Param" does not work

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.