Page 2 of 2

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

Posted: 27 Mar 2019
by Nikita Kurguzov
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 6919 times