I have a listview that I need to create a filter for when a user clicks on a button. The filter it needs to add is very complex and I am at a loss as to how to implement it. The application I am building is taking an existing Access database application and converting it to MVC. The filter they used in Access is below. How can I convert this to work in the function at the bottom? I have several filters like this to figure out so I greatly appreciate any help you can give me.
"(((UM)='yes') AND ((FINDATE) Is Not Null) AND ((INVMANDATE) Is Null)) OR (((STKCLASS)='yes') AND ((FINDATE) Is Not Null) AND ((INVMANDATE) Is Null)) OR (((COMMCODE)='yes') AND ((FINDATE) Is Not Null) AND ((INVMANDATE) Is Null)) OR (((COMMONINV)='yes') AND ((FINDATE) Is Not Null) AND ((INVMANDATE) Is Null)) OR (((UM)<>'YES') AND ((STKCLASS)<>'YES') AND ((COMMCODE)<>'YES') AND ((COMMONINV)<>'YES') AND ((INVCTLDATE) Is Not Null) AND ((INVMANDATE) Is Null)) OR (((UM)<>'YES') AND ((STKCLASS)<>'YES') AND ((COMMCODE)<>'YES') AND ((COMMONINV)<>'YES') AND ((REQDATE) Is Not Null) AND ((INVMANDATE) Is Null))"
function filterListview() {
var listView = $("#lvInvMan").data("kendoListView");
listView.dataSource.filter({});
var currentFilters = [], filter;
var myfilter = {
logic: "and",
filters: currentFilters
};
listView.dataSource.filter(myfilter);
}