look up field yes/no

Discussions about Forms Designer for SharePoint 2013 / 2016 and Office 365.
Locked
Malboro
Posts: 28
Joined: Wed Mar 09, 2016

03 Jun 2016

hi,

i want to filter field Yes/No but i have loading failed .

return "{WebUrl}/_api/web/lists('{ListId}')/items?$select=Id,{LookupField}&$filter=(facturable eq 'Oui')&$orderby=Created asc&$top=20";

}

return "{WebUrl}/_api/web/lists('{ListId}')/items?$select=Id,{LookupField}&$orderby={LookupField}&$filter=(facturable eq 'Oui') and startswith({LookupField}, '" + encodeURIComponent(term) + "')&$top=20";

}

User avatar
Dmitry Kozlov
Site Admin
Posts: 1524
Joined: Thu Jun 07, 2012

04 Jun 2016

Hi,

Please, try this:

Code: Select all

function (term, page) {
  if (!term || term.length == 0) {
    return "{WebUrl}/_api/web/lists('{ListId}')/items?$select=Id,{LookupField}&$filter=facturable eq '1'&$orderby=Created desc&$top=10";
  }
  return "{WebUrl}/_api/web/lists('{ListId}')/items?$select=Id,{LookupField}&$orderby={LookupField}&$filter=facturable eq '1' and startswith({LookupField}, '" + encodeURIComponent(term) + "')&$top=10";
}

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 16 guests