Items missing when scrolling lookup, but available in type search

rss

Posted by kevyn - Aug 8 ’16 at 09:46

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>' }

  • Dmitry Kozlov
    Dmitry Kozlov
    Admin
    Member for: 8 years 3 months 29 days
    #1 by Dmitry Kozlov Aug 9 ’16 at 01:10

    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.

  • kevyn
    Member
    Member for: 6 years 4 months 26 days
    #2 by kevyn Aug 11 ’16 at 05:04

    [#1]: 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) + "')";

    }

  • Dmitry Kozlov
    Dmitry Kozlov
    Admin
    Member for: 8 years 3 months 29 days
    #3 by Dmitry Kozlov Aug 12 ’16 at 08:48

    [#2]: After removing $top clause, Cross-site Lookup starts loading 100 items per request.

  • kevyn
    Member
    Member for: 6 years 4 months 26 days
    #4 by kevyn Aug 15 ’16 at 04:32

    [#3]: Using the code above, the list still loads 5 items at a time until you scroll down

  • Dmitry Kozlov
    Dmitry Kozlov
    Admin
    Member for: 8 years 3 months 29 days
    #5 by Dmitry Kozlov Aug 16 ’16 at 03:53

    [#4]: 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.

Displaying 1 to 5 of 5 messages