views:

894

answers:

2

I am retrieving a list of values from a sharepoint list, which works well but my problem is that it only retrieves the first 100 records. there are currently 500 records that should be available.

Scenario: I have two comboboxes on an infopath form:

  1. A List of Locations
  2. A list of areas within the locations

the list of locations will filter the list of areas but as infopath seems to only retrieve the first 100 records so most of the locations do not show any areas as there is nothing to filter.

+4  A: 

By design, the query will only return the first page of results from the default view for the list. Change the item limit for the default view in SharePoint, and you'll change the returned values for InfoPath.

EDIT (links from my comments, here for greater readability):

Here are sources describing this fix in MSDN forum (scroll to the bottom), a blog comment that describes the SharePoint setting step-by-step, one with a screen cap of the somewhat counter-intuitive interface, and another describing performance implications on the server side.

Hope this helps.

Argalatyr
The article mentioned has a note as part of the symtoms that the maximum limit for displayed items is 100. Will this affect the the returned rows even if i can the default view? I dont have access to the the view to change that easily.
Nathan Fisher
Yes, if you increase the item limit of the default view, the query return will increase as well. Am looking for a definitive reference for you...
Argalatyr
Here's a discussion in the MSDN forum: http://social.msdn.microsoft.com/Forums/en-US/sharepointinfopath/thread/0205e1ba-f205-4c29-9192-a6ba8cdeb12e
Argalatyr
Here in a blog entry: http://blogs.msdn.com/infopath/archive/2007/01/15/populating-form-data-from-sharepoint-list-views.aspx#8514914
Argalatyr
A couple more: http://blog-sharepoint.blogspot.com/2009/04/infopath-data-connection-not-returning.html and http://www.getsharepoint.com/blogs/bf/Lists/Posts/Post.aspx?ID=29
Argalatyr
@Argalatyr - Have not been able to get the permissions changed as yet but I have added a workaround that I found that may be usefull to someone.
Nathan Fisher
@Argalatyr Thanks for the links. they were very helpfull.
Nathan Fisher
+1  A: 

Just documenting what I have discovered trying to resolve the problem. I have not been able to change the default view as yet as I dont have the permission to. That should change though.

One possible workaround I have found is that you can export the list to Excel which contains all the data that I was looking for. the file that sharepoint produces is an Excel Query file like "export.iqy". You can save and open the file in notepad. which will look something like the following

WEB
1
http://SharepointSite/_vti_bin/owssvr.dll?XMLDATA=1&List={14C4ED2B-3050-4C47-B5F3-6333C3B0FB28}&View={8E6124E0-23F2-4BA2-86E7-96E7F36BAEC8}&RowLimit=0&RootFolder=%2fLists%2fSharepoint%20Sites

Selection={14C4ED2B-3050-4C47-B5F3-6333C3B0FB28}-{8E6124E0-23F2-4BA2-86E7-96E7F36BAEC8}
EditWebPage=
Formatting=None
PreFormattedTextToColumns=True
ConsecutiveDelimitersAsOne=True
SingleBlockTextImport=False
DisableDateRecognition=False
DisableRedirections=False
SharePointApplication=http://SharepointSite/_vti_bin
SharePointListView={8E6124E0-23F2-4BA2-86E7-96E7F36BAEC8}
SharePointListName={14C4ED2B-3050-4C47-B5F3-6333C3B0FB28}
RootFolder=/Lists/My list

You can take the third line which is -

http://SharepointSite/%5Fvti%5Fbin/owssvr.dll?XMLDATA=1&List={14C4ED2B-3050-4C47-B5F3-6333C3B0FB28}&View={8E6124E0-23F2-4BA2-86E7-96E7F36BAEC8}&RowLimit=0&RootFolder=%2fLists%2fSharepoint%20Sites

And use that to retrieve the complete list. I added an new receive data connection, selected an xml document and added the above URL.

It is not formated particullary nice but it will return all the data that I was expecting.

I think that Argalatyr solution is much simpler at this point, but it depends on if i am able to get the default view changed.

Nathan Fisher