How to properly prevent duplicates with Airtable collection?

I’ve created a view for my airtable table which groups the table by year. Which theoretically, should remove duplicates in my airtable collection in weweb.

I expected the fetched data to look like this:

{
  group1: [],
  group2: [],
  group3: [],
  ...
  group100: []
}

or just [group1, group2, group3, ..., group100]

But what was fetched was:

[entry1, entry2, entry3, …, entry100]

Is the intentional or did I miss something? I’m keen on filtering the duplicates at API level since it’s just very slow to query if I don’t remove the duplicates.

Hi @vincedc :wave:

If I understand correctly your use case, I believe this is intentional. When you group items in a table by year, it doesn’t remove duplicates. All the Airtable records are still part of the groups, both in the Airtable view and WeWeb collection.

Can you tell us a bit more about your data set, especially clarify what duplicates you are trying to exclude from the response and/or what data you’re hoping to get in WeWeb?

Perhaps you could achieve what you’d like with a “Filter by formula” at collection level: