3

There's a list A with over 65.000 list items and growing about 300 items/year. There's a list B with a lookup field to list A. I want to use the OOTB form to add an item in list B, but I need suggestions on filtering so many items. For example, the user should type "company" and the dropdown should show only the items with "company" on the description.

I think jquery but for 700 items is very slow. Using REST? I don't know how fast is

  • Do you mean to filter the dropdown list for the lookup field? – Robert Kaucher Feb 17 '15 at 19:48
4

You can run the REST query in the browser to time it I have a list with about 30k items and rest works Okey but I don't select all of them though.

I'd personally try angularJS together with the REST query to enable filtering for the users on the list but I'm unsure how well it will perform on such a large amount of items as I've never tried.

3

I would use the REST API for this for sure and customize the OOTB list form with a typeahead or some other selection mechanism for the lookup. Even a selectable gridview might be better than a typical select.

To filter using a typeahead sort of functionality you would use

var filterString = "?$filter=startsWith('" + valueUserTyped "',Title)";
var urlToList = "https://server.com/_api/web/lists(guid'3abb7f1c-f02e-4b10-bac8-1fcf7e6ec18e')/items";
$.ajax({
       type: "GET",
       url: urlToList + filterString, 
       headers: { "accept": "application/json; odata=verbose"}, 
      }).done(function (data, textStatus, jqXHR) {
           //Success code                         
      }).fail(function (jqXHR, textStatus, errorThrown) {
           //Handle errors                       
      });

I would not start the query to get the type ahead options until the user has typed in at least 3 to 5 characters. Using server filtering and paging will make things much faster and lighter weight.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.