Skip to Content
-1

how to remove duplicates for sap.m.ComboBox items through xml

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Feb 25 at 12:37 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 15 at 11:48 AM

    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);

    Add comment
    10|10000 characters needed characters exceeded

  • May 02 at 06:50 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded