Cross-List Lookup Filter
Posted: 04 Sep 2013
Are there any constants we can use in the filter portion of a "Request items" function?
Like a Now(), Today(), etc?
This is what I have so far:
function (term, page) {
if (!term || term.length == 0) {
return "{WebUrl}/_api/web/lists('{ListId}')/items?$select=Id,{LookupField}, Occuring, Location&$orderby=Show_x0020_Start, Show_x0020_End asc&filter=(new Date(Show_x0020_Start).getFullYear()>=Date().getFullYear())&$top=10";
}
return "{WebUrl}/_api/web/lists('{ListId}')/items?$select=Id,{LookupField}, Occuring, Location&$orderby={LookupField} asc&$filter=startswith({LookupField}, '" + term + "')&$top=10";
}
Like a Now(), Today(), etc?
This is what I have so far:
function (term, page) {
if (!term || term.length == 0) {
return "{WebUrl}/_api/web/lists('{ListId}')/items?$select=Id,{LookupField}, Occuring, Location&$orderby=Show_x0020_Start, Show_x0020_End asc&filter=(new Date(Show_x0020_Start).getFullYear()>=Date().getFullYear())&$top=10";
}
return "{WebUrl}/_api/web/lists('{ListId}')/items?$select=Id,{LookupField}, Occuring, Location&$orderby={LookupField} asc&$filter=startswith({LookupField}, '" + term + "')&$top=10";
}