Tuesday, February 23, 2010

Filtered cascading drop-downs in InfoPath browser forms using SharePoint lists and WSS owssvr.dll

REF: Biz Support Online .NET
by S.Y.M. Wong-A-Ton

Learn how you can use Windows SharePoint Services' (WSS) owssvr.dll and InfoPath's FileQueryConnection to write code that filters SharePoint list data displayed in dependent or cascading drop-down list boxes on an InfoPath browser form in SharePoint.


Problem
You have 3 drop-down list boxes on an InfoPath browser compatible form template.

You would like the second drop-down list box to be filled with only those items that are related to the item selected in the first drop-down list box, and you'd like the third drop-down list box to be filled with only those items that are related to the item selected in the second drop-down list box.

In essence, you want to create cascading drop-down list boxes on an InfoPath browser form.

Solution
Use the owssvr.dll of Windows SharePoint Services (WSS) to filter SharePoint list data and populate drop-down list boxes on an InfoPath browser form, thereby creating cascading lists.

Discussion
There are several ways to create cascading drop-down list boxes in InfoPath, some of which include using the Filter Data option in InfoPath if you're not creating a browser-compatible form template, using a web service, or writing code to filter items and then programmatically populate drop-down list boxes.

REF: Biz Support Online .NET
by S.Y.M. Wong-A-Ton

No comments:

Post a Comment