Populate SharePoint list item fields from QueryString parameter using InfoPath and QueryString filter web part

In this scenario, we have a SharePoint list that we want users to populate. But we want to set the title of each list item to a predefined value and have the users populate the rest.

Solution:

  1. From SharePoint Designer, click the list you want to modify
  2. From the menus at the top, click "Design Forms in InfoPath". This will launch InfoPath 2010 in design mode.
  3. From InfoPath, all the fields from the list should be visible. For each fields that should be read only to the end users, right click on the control for the field, click Properties, click the Display tab, check the "Read-only" checkbox, click OK.
  4. Publish form template
  5. From SharePoint Designer, under the site we are working on
    1. click "All Files"

    2. Lists

    3. Click on the list we are working on

    4. [You should see a list of aspx files and a few folders

    5. click the Items folder

    6. [You should see the following aspx. Since we are designing the list with infopath, SharePoint is now using these aspx pages to render for display, edit, and new items

    7. click newifs.aspx

    8. From the visual design view

      • click into the PlaceHolderMain area
      • From the menus at the top, click the "Insert" tab, click the "WebPart" icon, select Query String (URL) Filter from the dropdown menu
      • Select the new Query String filter webpart, right-click, select web part properties
      • Under Query String Parameter Name, type in the name of the Query string parameter, click OK
      • Select the InfoPath form web part on the design view, right-click, select Manage Connections
      • From the Web Part Connections prompt, click Add,
      • At the "Choose the action" dropdown, ensure it is set to "Get Data From", click Next
      • At the "Choose the page containing the web part for the connection, select "Connect to a web part on this page" radio button, click Next
      • For "Target web part", select Query String (URL) Filter. For "Target action", select "Send Filter Values to", Click Next
      • For Columns in InfoPath form web part, choose the field we want to map the value to, in my screen shot, it is "Title"
      • For Columns in Query String Filter web part, choose the QueryString field, click Next
      • Click Finish
    9. Save the newifs.aspx file