javascript - How to filter by part of value using OData? -
i have table lies data , change shown data according conditions (using odata). example:
"(lastdate eq null or lastdate ge datetime'" + date + "')"
or
"status eq 0"
now need filer shown in table value textbox , there problem. have used second thing:
"(order eq '" + search + "' or sellername eq '" + search + "' or itemtype eq '" + search + "' or itemdescription eq '" + search + "')"
works fine except eq. need find item not full match. saw there used called contains, didn't how supposed if have many or
. and... reveived an unknown function name 'contains' found
error.
how can accomplish this?
the .net implementation of odata has support "substringof" works same expect contains work. eg:
filter=substringof(sellername, ‘urn’)
returns records sellernames containing string “urn”.
you can or them togeather have eq.
filter=substringof(sellername, ‘urn’) or substringof(order, ‘urn’)
see here more details: https://msdn.microsoft.com/en-us/library/hh169248%28v=nav.80%29.aspx
Comments
Post a Comment