How To Pass QueryString Parameter Into Infopath Form SharePoint 2013

In this blog, you will learn how to pass QueryString Parameter into Infopath form-SharePoint 2013.

Overview of Infopath QueryString Parameter?

 
Ans
 
Not going to explain in a technical manner. There are two words first is QueryString and another one is parameter.
 
Example - https://sharepoint.com/abc/sitesPages/Home.aspx?appid=11
 
In the above URL, after ? appid is a QueryString and 11 is a value.
 

Implementation Part

 
Consider, you have completed the infopath designed part.
 
Follow the steps to achieve this,
  1. Open SharePoint Site.
  2. Go to Gear Box And select Add a Page.
  3. Provide a suitable name to your SharePoint Site Page.
  4. Now your page has been created.
  5. In Ribbon bar, select Insert Tab and select webpart.
  6. Select “Forms” from Category & From Webpart Select “Infopath Form Webpart”.
  7. Add one more webpart
  8. Select “Filters” from Category & From Webpart select Query String (URL) filter.
  9. Configure the InfoPath Form Web Part to point to the list or library where your form is published.
  10. In List & Library column select your list name.
  11. Content Type column it will appear automatically
  12. Change the submit behavior: As per your requirement.
  13. Again, do same for another QueryString Webpart
  14. Provide the QueryString Parameter name (Which Querystring value you want to display in URL)
  15. Next, set up the part-to-part connection by opening the Web Part edit menu and selecting Connections > Send Filter Values To > InfoPath Form Web Part.
  16. This brings up a dialog where you can choose the field in the form where the data should be sent. Choose the field you want, and then click Finish. In this case, we want to map the data to the “QueryStringParameter” field.
  17. Everything should be set up correctly now. Save your changes to this page, and then navigate to the page. You should see the blank form.
  18. To test that everything is working correctly, add “?QueryStringParameter=abc” to the end of the URL, and you should see the Referrer field being populated with the value “abc”.
Thanks