on 2024 May 29 3:16 PM
I have enabled the search property to TRUE and as its behaviour, it is going to search for all the properties that are binded in the table. So how to make it work for only one property.
Request clarification before answering.
@dwipal Please use this snippet for your rule
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Jitendra_Kansal, Thanks for the above approach. It worked but when i am adding additional query it did not working as earlier. So basically I get the customers based on the product associated with the customers and after that i search the customer name, so initially for empty search string it is working fine. it only fetch those customer which are equal to the given productId. But when i start searching for name it search from all the data list instead of those customer that are equal to the productId only.
let pageClientData =context.binding;
let productId = pageClientData.productId;
// Simple value assignment.
let search = context.searchString;
let qoB = context.dataQueryBuilder();
if (!search) {
let productFilter = qoB.filterTerm(`ProductId eq '${productId}'`);
qoB.filter(productFilter);
}
console.log("qoB",qoB);
if(search && search != ''){
let username = qoB.filterTerm(`substringof(tolower('${search}'),tolower(Name))`);
let productFilterTest = qoB.filterTerm(`ProductId eq '${productId}'`);
qob.filter().and(productFilterTest,username);
}
return qoB;
Hello @Jitendra_Kansal, The issue regarding productID is also resolved. Thanks for your suggestions and help
let pageClientData =context.binding;
let productId = pageClientData.productId;
// Simple value assignment.
let search = context.searchString;
let qoB = context.dataQueryBuilder();
let appFilter =`ProductId eq '${productId}'`;
if (!search) {
qoB.filter(appFilter);
}
if(search && search != ''){
let username = qoB.filterTerm(`substringof(tolower('${search}'),tolower(Name))`);
qoB.filter(appFilter).and(username);
}
return qoB;
User | Count |
---|---|
90 | |
11 | |
9 | |
8 | |
6 | |
5 | |
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.