Type ahead works in Quick Edit but not in "New Form"

Discussions about Cross-site Lookup
User avatar
Nikita Kurguzov
Posts: 889
Joined: Mon Jul 03, 2017

27 Mar 2019

Dear Dominique,
Please, use the following code in Advanced Settings -> Request Items:

Code: Select all

function (term, page) {
  if (!term || term.length == 0) {
    return "{WebUrl}/_api/web/lists('{ListId}')/items?$select=Id,{LookupField}&$orderby=Created desc&$top=10";
  }
  return "{WebUrl}/_api/web/lists('{ListId}')/items?$select=Id,{LookupField}&$orderby=Title&$filter=substringof('" + encodeURIComponent(term) + "',Title) or substringof('" + encodeURIComponent(term) + "', Status)&$top=10";
}
Now, you just need to make sure that Title and Status, used in second return statement match the Internal Names of the columns that you try to filter.

You can, for example, open source list -> List Settings -> Column configuration and check URL for each column:
InternalNameListSettings.png
InternalNameListSettings.png (15.06 KiB) Viewed 6908 times
Cheers

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 3 guests