# Removing duplicate Items

**URL:** <https://community.glideapps.com/t/removing-duplicate-items/42126>\
**Category:** Ask for Help\
**Created:** [May 18, 2022, 9:12pm UTC](https://community.glideapps.com/t/removing-duplicate-items/42126 "2022-05-18T21:12:52Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ANS\_Mermer](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/ans_mermer/32/15962_2.png) [@ANS\_Mermer](https://community.glideapps.com/u/ANS_Mermer)\
**Post date:** [May 18, 2022, 9:12pm UTC](https://community.glideapps.com/t/removing-duplicate-items/42126/1 "2022-05-18T21:12:52Z")

</div>

Hello,

My company buys similar items from various suppliers.  
ex: NM Dark Premium, EMS Dark Premium

I’ve constructed my spreadsheet so that each SKU has a “Purchase Description” and a “Sales Description”. The “Purchase Description” shows the supplier code in the string of text and is used for internal purposes. The “Sales Description” is a generic name for a product and doesn’t include the supplier.

Each item is grouped into Collections and I would like to only display SKUs using their Sales Description to my clients through a filter. I can do this now, however my dilemma is figuring out how I can remove items that have the same sales description and only show one of each unique sales description in the inline list.

 ![2022-05-18 14_11_07-ANSMERMER · Glide](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/c/0/c0a471c0603dcd4f9f0731f0eb3e778dacd71241.png)

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [May 18, 2022, 11:47pm UTC](https://community.glideapps.com/t/removing-duplicate-items/42126/2 "2022-05-18T23:47:10Z")

</div>

If I understand you right, “12x12x3cm” is “Sales Description”?

You can do it like this:

- Add a rowID column in the table that house this data, if you haven’t.

- Create a relation from the Sales Description column to itself, returning multiple matches.

- Add a single value column on top of that relation to return the 1st rowID.

- Filter your list by rowID is the same as the 1st rowID from the relation.

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [May 18, 2022, 11:48pm UTC](https://community.glideapps.com/t/removing-duplicate-items/42126/3 "2022-05-18T23:48:30Z")

</div>

This 👆

---

<div class="post-metadata">

**Author:** ![gvalero](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/gvalero/32/1037_2.png) [@gvalero](https://community.glideapps.com/u/gvalero)\
**Post date:** [May 19, 2022, 4:24am UTC](https://community.glideapps.com/t/removing-duplicate-items/42126/4 "2022-05-19T04:24:47Z")

</div>

> [@ThinhDinh](#):
>
> Create a relation from the Sales Description column to itself, returning multiple matches.

Hola!

I’d do this in another way and being honest, I don’t like or trust relations in the same table. I think that this kind of trick causes problems when you have too much data in table (+1000 rows) and accidentally, we are creating an overwork in the table.

I don’t how to call it (maybe it’s a misunderstanding or myth of mine) but I imagine something like a “problematic recursive search”. If anyone can confirm or discard it, I will appreciate it 🙄

Well, here is my proposal to get something like this:  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/5/3/5331d9d3464b3883e8485c5192406c2de30f4d94.png)

The steps are:

1. Create a SEQ column to have an index numeric associated to your product (Sales Description?) and a new Joined List column to gather all your products.  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/c/d/cd36428baa0562b9915ff06b746c9f4cafe8633e.png)

2. Use this JS code and its parameters shown to save columns and mark your unique products. Now, your filter can work without problem with these rows marked as _true_.  

```auto
const arr=p1.split(",")
// Find out the 1st coincidence
let index = arr.indexOf(p2)+1;

// Check if ID is that 1st coincidence
if (index==p3)
    return true

```

I hope it helps you!

Saludos a todos!

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)\
**Post date:** [May 20, 2022, 4:25am UTC](https://community.glideapps.com/t/removing-duplicate-items/42126/5 "2022-05-20T04:25:28Z")

</div>

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.
