I want to set filters in odata queries with user interaction. When the user selects a data attribute I already know its type. For instance if the user want to filter with SALE_PRICE equal to some number I already know that the selected attribute is of type Edm.Decimal. So I tried to use this fact and build the query with the cast operation. For instance, to get the data where the SALE_PRICE is equal to 323.7 I create the following URI:
analyticView?$select=AMOUNT_SOLD,FAMILY_NAME&$filter=SALE_PRICE+eq+(cast(323.7,'Edm.Decimal'))&$format=json
but I am getting an error message saying:
"No property 'cast' exists in type
I also tried this on the serivces.odata.org API, and it doesn't seem to work
http://services.odata.org/V3/Northwind/Northwind.svc/Orders?$select=Freight,OrderID&$filter=OrderDate+eq+(cast(1996-07-05T00:00:00,'Edm.DateTime'))&$top=5&$format=json
could you please check what's wrong