in

InfoPath Dev

Query SharePoint List

Last post 10-22-2007 01:10 PM by Sharksfan. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 10-10-2007 08:27 AM

    Query SharePoint List

    Using InfoPath 2003 and WSS 2.0

     Anyone know how I can filter the return data on a Refresh from a Data Source?  I tried using Matt's tutorial http://www.infopathdev.com/blogs/matt/archive/2006/02/02/Add-SharePoint-List-Items-with-InfoPath.aspx and this works great for displaying ALL of the list data or submitting to the SharePoint list, but I want to filter/limit the data that is returned when Refresh is done.  Is this possible?  I have tried multiple ways.

    If this is not an option is there a way to build a Query using Web Service (retrieve data) and referencing the SharePoint list?

  • 10-19-2007 02:58 PM In reply to

    Re: Query SharePoint List

    bump

  • 10-20-2007 07:31 PM In reply to

    Re: Query SharePoint List

    Hi Sharksfan! Sorry for the delay in responding.

    If you want to filter what is returned from the server, you will have to use a Web Service. SharePoint provides a bunch of Web services, but I'm not sure if they allow filtering on a list. We do this a lot using our Database Accelerator. We filter the contents from SQL. In order to do the filtering there has to be some server-side code that takes a parameter and executes a filtered query based on it. You should read the SharePoint SDK and see if such a thing exists for SharePoint. My hunch is that it doesn't exist, so filtering the list of what is returned is not going to happen with SharePoint on the server, but I cannot give a definitive answer.

    If you want to filter client side, you can do this in InfoPath. After you pull the items into a secondary data source, you can use a filter on top of that or write code. For best performance, you'll want to write a little code that copies the items you want into another secondary data source after query executes. Then, bind that field to the view. This will reduce the number of window handles created in the view. For large lists it can be a big issue. You can display count of items in list and use a conditional section to require users to type in a string and click a button to filter the list down before displaying. That wlil require some code. We'd be happy to help you write the code, but you'll need to send us your solution and buy a few hours of support credits.

    Good luck!

    Patrick Halstead / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 10-22-2007 01:10 PM In reply to

    Re: Query SharePoint List

    Thanks for the reply Patrick.  Bummer......no way in SharePoint.  I would have used SQL or MS Access, but I am restricted from using those solutions since I am not in the "IT" dept which is why I'm going for an InfoPath/WSS solution.

    I'll develop a little more of my solution before I ask for support, but that is a good alternative for me.  Thanks again for the information and suggestions.

Page 1 of 1 (4 items)
Copyright © 2003-2007 Qdabra Software. All rights reserved.
View our Terms of Use.