Home › Forums › Autocomplete › Autocomplete, Sort, Source List Over 1,000…
- This topic has 3 replies, 2 voices, and was last updated 5 years, 2 months ago by Alexander Bautz.
-
AuthorPosts
-
-
October 7, 2019 at 13:39 #27256
Alexander,
Using Autocomplete, I have found that sort of results (orderBy) fails when the source list is over 1,000 items. I am sorting by ID, descending. I have attached two screenshots – one with less than 1,000 items in the source list, and one with more than 1,000 items.
As always, I sincerely appreciate your support and efforts!
R’grds – Ben.
Reference:
Version information
DFFS Loader: v2
DFFS frontend: 4.4.4.10 – September 20, 2019
DFFS frontend CSS: 4.51 / 4.51
Autocomplete: 1.6.37 – September 04, 2019
Cascading dropdowns: 3.7.30 – July 21, 2019
jQuery: 1.12.4
Lookup: 1.1.17 – July 21, 2019
Resource management: 2.4.5 – August 29, 2019
SPJS-Utility: 1.337 – September 04, 2019
vLookup: 2.2.138 – September 04, 2019spjs.ac.textField({ "applyTo": "TransPipeLookup", "helpText": "Key Transaction ID, LOB, or Name...", "loadText": "", "listGuid": "TransPipeDevX", "listBaseUrl": "/sites/spptdgsl/TransPipeDev/", "showField": "TransPipeLookup", "searchFields": [], "filterCAML": "<Where><Eq><FieldRef Name='CommodityType'/><Value Type='Text'>Tech</Value></Eq></Where>", "useREST": false, "preloadData":false, "filterREST": "", "optionDetailFields": [], "optionDetailPrefix": [], "enforceUniqueValues": true, "rowLimit": 15, "listOptionsOnFocus": false, "minLengthBeforeSearch": 2, "reValidateOnLoad": false, "allowAddNew": false, "isLookupInSelf": false, "addNewAdditionalFields": [], "multiselect": false, "multiselectSeparator": "; ", "orderBy": [ { "fin":"ID", "ascending":false } ], "clearSetFieldsOnInvalidSelection": false, "setFields": [ { "fromFIN":"ID", "toFIN":"KeyTransID" }, { "fromFIN":"Title", "toFIN":"Title" }, { "fromFIN":"LOB", "toFIN":"LOB" }, { "fromFIN":"SubLOB", "toFIN":"SubLOB" }, { "fromFIN":"TechCommodities", "toFIN":"TechCommodities" } ], "debug": false });
Attachments:
-
October 10, 2019 at 16:21 #27307
Sorry for the delay – I’ll try to recreate this issue and get back to you as soon as I can manage.
Alexander
-
October 11, 2019 at 14:09 #27311
Alexander,
I’m sorry to say that my analysis of the problem was false… As I continue to test, I’ve found that the number of items in the source list is not the cause of the problem (just a difference between my DEV to PROD environments) – sorry for the false lead.
The problem is with the result sorting the ID field (which is a number field) is not following numerical sort (sample result: 100, 150, 2, 25, 3, 55, 550).
Reading about SPJS-Lookup, you address this symptom in the customSort option, describing: “… This sort function example sorts values that contains numbered options from 1-10. The default alphabetical sort order would sort like this: 1, 10, 2, 3 etc., but now it will show 1, 2, 3 …”
Is a numerical sort possible in Autocomplete?
Again, sorry for the false lead.
R’grds – Ben.
-
October 13, 2019 at 08:58 #27320
Hi,
I’ll add a numeric sort option and release a new version next week. You can then specify it like this:... ... "orderBy": { "fin": "SortIndex", "ascending": true, "numeric": true }, ... ...
I’ll update SPJS-lookup also so you can use the same numeric sort function in both solutions.
Alexander
-
-
AuthorPosts
- You must be logged in to reply to this topic.