on 07-06-2017 5:39 PM
Hi Experts,
I am using oModel read function to read the service and am passing the filter for first name, last name and etc. It is working fine when there is no single quote in first name or last name, If there is any single quote present in the filter string then the filter functionality is not working correctly as expected. Please find below the code
this.oModel.read(sUrl, null, null, true, function(oEvent1) {
var out = formatter.formatEmpData(oEvent1.results);
}
);
sUrl is search parameter with filter function. when i debug i have the sUrl as "/EmpSet?$filter=Name eq 'o'john' "
In the backend we have field name as o'john with Aporstphe. The filter functionality is working fine without any single quotes for other values. Please share how to let us know if you handle this scenario in your use case.
Thanks,
Saravanan
Hi ,
Check out this link ... it will help you ..https://stackoverflow.com/questions/19319170/how-to-escape-single-quote-in-odata-filter-uri
thanks
Viplove
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi All,
I have solved the above issue by changing the aporstphe with "%27%27". It worked for me.
Thanks,
Saravanan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.