3
votes

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.

3

3 Answers

7
votes

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.

1
votes

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/_vti_bin/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.

0
votes

there is yet one workaround of this without such hardcoding. If you open Query editor, then you have there available ribbon with menu items. Open "Home" -> "Select top rows" and enter there some realy high number (I have in my list 596 rows, so I entered there as limit of top rows 20000 and I got whole list).

Sorry, I don't have available English version of Excel, so I cannot add screenshots.

enter image description here