# How to create a unique array of numbers

**URL:** <https://community.fibery.io/t/how-to-create-a-unique-array-of-numbers/3395>\
**Category:** Get Help\
**Created:** [October 12, 2022, 6:23pm UTC](https://community.fibery.io/t/how-to-create-a-unique-array-of-numbers/3395 "2022-10-12T18:23:08Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![helloitse](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/helloitse/32/498_2.png) [@helloitse](https://community.fibery.io/u/helloitse)\
**Post date:** [October 12, 2022, 6:23pm UTC](https://community.fibery.io/t/how-to-create-a-unique-array-of-numbers/3395/1 "2022-10-12T18:23:08Z")

</div>

I’d like to create a list of numbers that are unqiue. In Airtable I would use the `ArrayUnique` formula.  
In my case I have a list of contacts with a one to many relationship to phone calls.  
I’d like to be able to determine which contacts were contacted each year and then extract other information from the contact records (such as birthdate, shirt size, etc).

My initial thought is to create a formula field on the contact record that looks up the year of each linked phone call and then returns a deduped/unique list of the years.  
Any ideas about how I can pull this off?

---

<div class="post-metadata">

**Author:** ![Chr1sG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/chr1sg/32/3941_2.png) [@Chr1sG](https://community.fibery.io/u/Chr1sG)\
**Post date:** [October 12, 2022, 8:29pm UTC](https://community.fibery.io/t/how-to-create-a-unique-array-of-numbers/3395/2 "2022-10-12T20:29:13Z")

</div>

It might be easiest to create a ‘helper’ database for the set of possible years, and then auto-relate these to the phonecalls, i.e. by matching the Year’s name against a new formula field in the phone call db: `ToText(Year(DateField))`  
Then you can just use a lookup in the Contacts db to get all the possible Years linked to its phonecalls.

It also has the advantage that you can do some useful queries from the Year database.

---

<div class="post-metadata">

**Author:** ![helloitse](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/helloitse/32/498_2.png) [@helloitse](https://community.fibery.io/u/helloitse)\
**Post date:** [October 12, 2022, 9:31pm UTC](https://community.fibery.io/t/how-to-create-a-unique-array-of-numbers/3395/3 "2022-10-12T21:31:16Z")

</div>

Thanks Chris, I’ll look into that

Can you share whether there is anyway workaround to dedupe a collection of data?  
Ex: 2001, 2002, 2001, 2003, 2004 → 2001, 2002, 2003, 2004

I feel like I have run into this a few times lately.

---

<div class="post-metadata">

**Author:** ![Chr1sG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/chr1sg/32/3941_2.png) [@Chr1sG](https://community.fibery.io/u/Chr1sG)\
**Post date:** [October 13, 2022, 5:25am UTC](https://community.fibery.io/t/how-to-create-a-unique-array-of-numbers/3395/4 "2022-10-13T05:25:33Z")

</div>

Have you checked out the Deduplication template?

> **[Read.me](https://apps.fibery.io/@public/Deduplication/Read.me-1744)**
>
> Tailored workspace for your company. Connected databases, customizable views, powerful reports, automations, integrations, docs & whiteboards.

---

<div class="post-metadata">

**Author:** ![helloitse](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/helloitse/32/498_2.png) [@helloitse](https://community.fibery.io/u/helloitse)\
**Post date:** [October 13, 2022, 2:40pm UTC](https://community.fibery.io/t/how-to-create-a-unique-array-of-numbers/3395/5 "2022-10-13T14:40:18Z")

</div>

Oh, just to be clear this thread is about returning results in a field. I am not looking to remove duplicate entities.  
I’m curious to know if there is any workaround for not having a “unique” or “arrayunique” formula that would take a collection field and output a list/array that only has unique values in another field.

---

<div class="post-metadata">

**Author:** ![Chr1sG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/chr1sg/32/3941_2.png) [@Chr1sG](https://community.fibery.io/u/Chr1sG)\
**Post date:** [October 13, 2022, 2:49pm UTC](https://community.fibery.io/t/how-to-create-a-unique-array-of-numbers/3395/6 "2022-10-13T14:49:40Z")

</div>

Well, Fibery doesn’t really have the concept of arrays, except as entities in a database.  
So there is no such thing as the ‘unique values in a collection field’ since all entries in a collection field are, per definition, unique.

Of course, they might have identical values in one of more of their fields (which seems to be the case you’re interested in).  
If the field by which uniqueness is determined is a select field, or a collection field, then the lookup method described above will work.

Otherwise, it’s not possible, since there is no valid datatype for storing the result.  
So for example, if it is a number field, and you want all the possible unique values of that number field, the result would be a collection (array) of numbers (which is a primitive datatype) but there is no way to store an array of primitives.

I hope that makes sense.  
It’s not meant to be an attempt to undermine/disagree with what is a clearly-defined need, just an explanation of why it is not currently possible.

---

<div class="post-metadata">

**Author:** ![helloitse](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/helloitse/32/498_2.png) [@helloitse](https://community.fibery.io/u/helloitse)\
**Post date:** [October 14, 2022, 11:52am UTC](https://community.fibery.io/t/how-to-create-a-unique-array-of-numbers/3395/7 "2022-10-14T11:52:59Z")

</div>

Yes, this has been a bit of a thorn in my side as of late. It’s hard to work around the lack of simple arrays. Looks like I need to put in a feature request

---

<div class="post-metadata">

**Author:** ![Eren\_Turgut](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/eren_turgut/32/4425_2.png) [@Eren\_Turgut](https://community.fibery.io/u/Eren_Turgut)\
**Post date:** [October 14, 2022, 12:53pm UTC](https://community.fibery.io/t/how-to-create-a-unique-array-of-numbers/3395/8 "2022-10-14T12:53:25Z")

</div>

I’m not sure if I have understood you correctly:

You have contacts [C], each of which can have multiple phone calls [PC], and each [PC] has a year in which the phone call was made [Y].

Now you want to see in a separate field, a list of all years in which at least one phone call was made?  
So if you have a contact which has had 12 phone calls, 10 in the year 2019, 1 in year 2021, and 1 in year 2022, you want to see a field like this: “2019, 2021, 2022”

Is my understanding correct?

Edit: [Brackets] indicate a database/type (as opposed to just a field)

---

<div class="post-metadata">

**Author:** ![helloitse](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/helloitse/32/498_2.png) [@helloitse](https://community.fibery.io/u/helloitse)\
**Post date:** [October 19, 2022, 11:38am UTC](https://community.fibery.io/t/how-to-create-a-unique-array-of-numbers/3395/9 "2022-10-19T11:38:45Z")

</div>

Yes, this is my goal

---

<div class="post-metadata">

**Author:** ![Eren\_Turgut](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/eren_turgut/32/4425_2.png) [@Eren\_Turgut](https://community.fibery.io/u/Eren_Turgut)\
**Post date:** [March 10, 2023, 1:58pm UTC](https://community.fibery.io/t/how-to-create-a-unique-array-of-numbers/3395/10 "2023-03-10T13:58:21Z")

</div>

Sorry I never followed up. Is this still a need?

---

<div class="post-metadata">

**Author:** ![helloitse](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/helloitse/32/498_2.png) [@helloitse](https://community.fibery.io/u/helloitse)\
**Post date:** [March 16, 2023, 6:07pm UTC](https://community.fibery.io/t/how-to-create-a-unique-array-of-numbers/3395/11 "2023-03-16T18:07:54Z")

</div>

Well the Array field feature doesn’t exist yet to my understanding so it’d be great to have it.

For my use case, I’ve created a Year database and it is linked to phone calls. I can create a unique array of years contacted by lookup years from the Phone Calls database.

---

<div class="post-metadata">

**Author:** ![Eren\_Turgut](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/eren_turgut/32/4425_2.png) [@Eren\_Turgut](https://community.fibery.io/u/Eren_Turgut)\
**Post date:** [March 17, 2023, 11:02am UTC](https://community.fibery.io/t/how-to-create-a-unique-array-of-numbers/3395/12 "2023-03-17T11:02:36Z")

</div>

I was going to propose a formula field just showing the years but you seem to have a working solution with additional benefits 🙂
