on 02-25-2019 7:57 AM
Hai Experts,
I am having one sap.m.ComboBox which is loading some data once after made some events, The data is loading is having duplicate values, I know the duplicates can be removed through same js methods, but can anybody help me to do the same through XML..?
Thanks,
Muhsin
Hey Muhsin,
there is no way removing duplicates via XML explicitly.
You are only able to filter the items but unfortunately not with something that removes duplicates.
Depending on your model (JSON or OData) you can remove duplicates in your Backend Service (OData) or remove them before setting the data to your Model (JSON)
Hope that helps.
Greetings
Sebastian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Muhsin Panakkal,
if you are using odata service, this is design issue, sometimes you wont get duplicate record with test run, but after binding you gets duplicate due to design issue,
in the entity set there is no proper unique key assigned, check the properties of entityset and set the unique key(s) there itself. duplicate value will be avoided.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
var arr = [{ "State": "RWCW"}, { "State": "RSCW"}, { "State": "RWCW"}, { "State": "RSCW"}]; var clean = arr.filter((arr, index, self) => index === self.findIndex((t) => (t.save === arr.save && t.State === arr.State))) console.log(clean);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.