rowLimit in spautocomplete

May 23, 2011 at 8:42 PM

in order to get the autocomplete rowlimit implemented, I added " rowLimit: 0, // Sets the maximum number of rows that can be returned" to line 2824 (autocomplete options) and changed line 2901 to " // Override the default view rowlimit and get all appropriate rows CAMLRowLimit: opt.rowLimit," 

I have tested with a large list (over 3000 items) and it works well, could you possibly implement this as an option in 0.6.2 ? Otherwise, in very large lists, the operation can cause the browser to hang for several seconds.

thanks

Steve

Coordinator
May 23, 2011 at 8:58 PM

Steve:

I can add this to the list for implementation in the next version, but I'm a little worried about how it would work. If it's a simple rowlimit, then you'll get back the first n matches. That means that you might not get back the value the user is actually looking for.

M.

May 23, 2011 at 9:11 PM

Marc,

understood. It works well for our list because the column we search on starts with the same 4 characters ex: "REQ-2011-1234-A". We want the user to be able to enter the 4 digit number (ex: 1234), but if the user just starts typing "REQ...", we hit the bottleneck, so a rowLimit is the appropriate feature for this case. Might not be appropriate for others though.

Coordinator
May 23, 2011 at 9:16 PM

Have you set

filterType: "Contains",

? How will you know what the right number for rowlimit should be?

M.

May 23, 2011 at 9:20 PM

yes we use "filterType: Contains" in this case.

in most cases, the user will type in 3 or 4 digits of the number they are searching for and get specific results. For example, if looking for 2566, typing 256 will return 2560-2569. But, nothing prevents the user from typing "REQ", at which point everything in the list is returned 

Coordinator
May 23, 2011 at 9:22 PM

Got it. Well, you've clearly thought it through. Sometimes I have to help people to protect themselves. ;+)

M.

Coordinator
May 23, 2011 at 9:23 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
May 23, 2011 at 9:24 PM

well, not sure about "clearly"; hopefully it doesn't backfire on me :-D 

appreciate the attention to detail and your continued development and support !

Coordinator
May 23, 2011 at 9:28 PM

You bet!

M.