on 2024 Oct 10 5:23 AM
Hi community,
I recently developed an application in SAP MDK where I'm using a ListPicker control connected to an OData service. Previously, this control was not case-sensitive, so it didn't matter whether the search text had uppercase or lowercase letters.However, since updating to version 24.4 of MDK, I've noticed a change in behavior. Now, when performing a search in the ListPicker, the entered text must exactly match the format stored in the database. For example, if the value is stored as "HOUSE" in the database and I type "House," no matches are found.
Has anyone else experienced this case sensitivity issue with the ListPicker? I'd appreciate any insights or suggestions on how to ignore case sensitivity or if there’s a workaround for this behavior.
Thanks in advance for any help you can provide!
Do you have any knowledge about this behavior? @Jitendra_Canal
Is your MDK app online or offline?
If online:
First, check if you can filter the results in lowercase for the given entity. Navigate to the Mobile Services Admin UI:
Depending on the OData version (V2 or V4), use the following filters:
If you see the expected results there, you should also see them in your MDK online app. If not, then the behavior is as expected.
If offline:
The offline SDK automatically handles case insensitivity, so you should be able to search without worrying about case.
However, for online searches, you can enable case-insensitive searching using the Query Builder:
//this is an example for OData V2.
export default function SearchCustomer(context) {
let search = context.searchString;
let qoB = context.dataQueryBuilder();
if (search && search != '') {
let suppName = qoB.filterTerm(`substringof(tolower('${search}'),tolower(SupplierName))`);
let defaultSearch = qoB.mdkSearch(search);
qoB.filter().or(suppName, defaultSearch);
return qoB;
}
}
See this document for more details.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
64 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.