We have newcomers into our Techedge’s office in Lucca and we’re training them to become awesome OpenUI5 ninja dev (the path is long but we believe in them).
They’re fresh from IT University and they don’t know yet how to get their hands dirty and develop with SAPUI5. So we gave them some good material to read and watch (SAPUI5 Walkthrough tutorial and Developing Web Apps with SAPUI5).
After they’ve finished this introduction I would like to test what they’ve learned and their adaptive skills. So I’ve started to create some UI5 exercise examples that go from easy to hard.
In one of this example app, I needed to filter the Business Partner’s CompanyName attribute (I’m using Netweaver Gateway Demo ES5).
I’ve added a SearchField, I’ve attached the search event to my implementation on the Controller and tested it.
So in the GIF, I’m trying to filter them with the String “SAP” and everything works as expected but if I try with “Sap” I get no record.
For something like 10 long seconds I’ve scratched my head asking “Why?”
Then the lightbulb lightens up and I’ve remembered that I’ve already handled something like this for a Trenitalia’s project. And that I’ve also submitted a proposal on OpenUI5’s Github issue system.
The problem is all about the case-insensitive filter.
The solution
Here’s my actual solution (pretty easy uh?)
The implementation problem
So, if you’re backend system support the tolower operation (like HANA) you’re done.
Otherwise, you need to implement it on your own or you’ll get this error:
Have fun programming ;)