Apr 17, 2013

Passing parameters to InfoPath forms in SharePoint 2010

Until SharePoint 2010,  I used two methods to pass parameters to forms in SharePoint:

1. Using Javascript/JQuery to read a URL Query parameter and assign it to the HTML control.  This was error prone due to the difficulty of finding the right control via the "title" attribute and then assigning the value to all the different types of control, especially lookup fields with more than 20 elements.

2.  Using Managed code in InfoPath to read a URL Query parameter and assign it to a node in the InfoPath data tree.  This required publishing the InfoPath form via Central Administration and was rather inflexible.

Thankfully, the InfoPath/SharePoint teams have given us a third option in SharePoint 2010:
  Connecting the Query parameter filter webpart with the InfoPath form webpart. 

This video by Igor Jericevich gives the details: http://youtu.be/tskm5mQ3W3g

No comments:

Post a Comment