Items missing when scrolling lookup, but available in type search
On a 2 part lookup list of 77 items, when I scroll down the list I sometimes cannot see some items listed, however when I start typing in part of the item text, it appears on the list. This is making the experience difficult for the users - is there anything that can be done please?
(Using Office365/Plumsail lookups)
Request items:
function (term, page) {
if (!term || term.length == 0) {
return "{WebUrl}/_api/web/lists('{ListId}')/items?$select=Id,{LookupField}&$orderby=Created asc&$top=5";
}
return "{WebUrl}/_api/web/lists('{ListId}')/items?$select=Id,{LookupField}&$orderby=Title&" +
"$filter=startswith(Project_x0020_Number, '" + encodeURIComponent(term) + "') or " +
"startswith(Title, '" + encodeURIComponent(term) + "') or " +
"startswith(Client_x0020_ID, '" + encodeURIComponent(term) + "')&$top=5";
}
Item format:
function(item) { return '<span class="csl-option">' + item["{LookupField}"] + '</span>' }
(Using Office365/Plumsail lookups)
Request items:
function (term, page) {
if (!term || term.length == 0) {
return "{WebUrl}/_api/web/lists('{ListId}')/items?$select=Id,{LookupField}&$orderby=Created asc&$top=5";
}
return "{WebUrl}/_api/web/lists('{ListId}')/items?$select=Id,{LookupField}&$orderby=Title&" +
"$filter=startswith(Project_x0020_Number, '" + encodeURIComponent(term) + "') or " +
"startswith(Title, '" + encodeURIComponent(term) + "') or " +
"startswith(Client_x0020_ID, '" + encodeURIComponent(term) + "')&$top=5";
}
Item format:
function(item) { return '<span class="csl-option">' + item["{LookupField}"] + '</span>' }
- Dmitry Kozlov
- Site Admin
- Posts: 1524
- Joined: Thu Jun 07, 2012
We could not reproduce the issue. By default, Cross-site Lookup loads items portionally while a user is scrolling the results. You can remove '$top=' clause from the first request to get all item at once. Check if all items from the source list are there.
After removing the '$top=' from both parts of my request, I don't see any difference in the way the application behaves? I still see the 'loading more results' as I scroll down the list
Current request:
function (term, page) {
if (!term || term.length == 0) {
return "{WebUrl}/_api/web/lists('{ListId}')/items?$select=Id,{LookupField}&$orderby=Created asc";
}
return "{WebUrl}/_api/web/lists('{ListId}')/items?$select=Id,{LookupField}&$orderby=Title&" +
"$filter=startswith(Project_x0020_Number, '" + encodeURIComponent(term) + "') or " +
"startswith(Title, '" + encodeURIComponent(term) + "') or " +
"startswith(Client_x0020_ID, '" + encodeURIComponent(term) + "')";
}
Current request:
function (term, page) {
if (!term || term.length == 0) {
return "{WebUrl}/_api/web/lists('{ListId}')/items?$select=Id,{LookupField}&$orderby=Created asc";
}
return "{WebUrl}/_api/web/lists('{ListId}')/items?$select=Id,{LookupField}&$orderby=Title&" +
"$filter=startswith(Project_x0020_Number, '" + encodeURIComponent(term) + "') or " +
"startswith(Title, '" + encodeURIComponent(term) + "') or " +
"startswith(Client_x0020_ID, '" + encodeURIComponent(term) + "')";
}
- Dmitry Kozlov
- Site Admin
- Posts: 1524
- Joined: Thu Jun 07, 2012
After removing $top clause, Cross-site Lookup starts loading 100 items per request.
- Dmitry Kozlov
- Site Admin
- Posts: 1524
- Joined: Thu Jun 07, 2012
Make sure that you picked a correct lookup field and saved the configuration in the lookup manager. Then re-save the form in Forms Designer and clear the browser cache.
-
- Information
-
Who is online
Users browsing this forum: No registered users and 3 guests