cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

Hi

After spending several hours to fix this and trying out several possibilities, i still cannot manage to make it work, Here is the issue

Below is the code


var ofilter = new sap.ui.model.Filter({

               path: "Property",

               operator: sap.ui.model.FilterOperator.EQ,

               value1: "Something"

          });

.../EntityName?$filter=Property eq 'Something' - This is how the string SHOULD be formed

.../EntityName?$filter=Property eq Something - This is how it IS formed(notice the missing quotes


I get the below error if if the url is not formed in the "should" way


Invalid filter expression: 'Property eq Something '

Does anyone have any suggestions to fix this?

Thanks

Jayant

0 Likes
View Entire Topic
rpanneel
Participant
0 Likes

Hi Jayant,

And if you pass the filter like this:

new sap.ui.model.Filter("Property", sap.ui.model.FilterOperator.EQ, "Something");


Regards,


Robin


Former Member
0 Likes

Yes, that is how it was initially and then i made if more explicit hoping it would understand that it is string. Still no difference.