# CHANGELOG: Oct 27 / Sort() and First() in formulas, Undelete Types and Fields, Delete Workspace, Pen

**URL:** https://community.fibery.io/t/changelog-oct-27-sort-and-first-in-formulas-undelete-types-and-fields-delete-workspace-pen/2156
**Category:** Changelog
**Created:** [October 27, 2021, 5:11pm UTC](https://community.fibery.io/t/changelog-oct-27-sort-and-first-in-formulas-undelete-types-and-fields-delete-workspace-pen/2156 "2021-10-27T17:11:07Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![mdubakov](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/mdubakov/32/10_2.png) [@mdubakov](https://community.fibery.io/u/mdubakov)
#### Post date: [October 27, 2021, 5:11pm UTC](https://community.fibery.io/t/changelog-oct-27-sort-and-first-in-formulas-undelete-types-and-fields-delete-workspace-pen/2156/1 "2021-10-27T17:11:07Z")

</div>

## Sort(), First() and Last() in formulas 🥇

Now you can do clever things with collections, like sort them and extract the first or last element.

```auto
Epics.Sort(Name).First().Name

Companies.Sort([Creation Date], false).First().Contacts.Count()

Companies.Sort(Name).First().Country.Name

```

## Undelete Types and Fields 🌤

Sometimes you delete a field. Or a Type with 10000000 entities. Manual fields or Types restoration sucks. We got fed up and implemented Undelete action. Find deleted Types and Fields in Audit Log, get them back and sleep well.

 ![Screenshot 2021-10-27 at 8.24.49 PM](https://us1.discourse-cdn.com/flex020/uploads/fibery/original/2X/6/683c0baf34f2984caf583a71c4c2b723d920256f.png)

## Delete Workspace ⛈

Manual workspace deletion sucks. We got fed up and implemented Delete Workspace functionality. If you no longer love Fibery, use it. Just try. Go for it. It deletes EVERYTHING (GDPR is happy).

 ![Screenshot 2021-10-27 at 7.47.36 PM](https://us1.discourse-cdn.com/flex020/uploads/fibery/original/2X/5/578ee76f548d4de6916a614594642009727e79a5.png)

## Whiteboard: Handwriting pen ✍

Whiteboard got better. Draw something ugly!

 ![Screenshot 2021-10-27 at 8.00.25 PM](https://us1.discourse-cdn.com/flex020/uploads/fibery/original/2X/b/bf0a0f124e52c25a76ed55b6fc1b3cf6ba55210d.png)

## Fixed bugs 🦐

- Android/Chrome: Header is hidden under the address bar, so it’s impossible to open left menu
- Email sync: It’s impossible to sync parent folder if there is a child folder inside it
- Do not send 2 notifications on mention in comment

---

<div class="post-metadata">

### Author: ![Matthew\_Oates](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/matthew_oates/32/4209_2.png) [@Matthew\_Oates](https://community.fibery.io/u/Matthew_Oates)
#### Post date: [October 27, 2021, 5:41pm UTC](https://community.fibery.io/t/changelog-oct-27-sort-and-first-in-formulas-undelete-types-and-fields-delete-workspace-pen/2156/2 "2021-10-27T17:41:33Z")

</div>

Woot! First() !

---

<div class="post-metadata">

### Author: ![cannibalflea](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/cannibalflea/32/318_2.png) [@cannibalflea](https://community.fibery.io/u/cannibalflea)
#### Post date: [October 27, 2021, 5:59pm UTC](https://community.fibery.io/t/changelog-oct-27-sort-and-first-in-formulas-undelete-types-and-fields-delete-workspace-pen/2156/3 "2021-10-27T17:59:56Z")

</div>

> [@mdubakov](#):
>
> Now you can do clever things with collections, like sort them and extract the first or last element.

This is such an important addition. Any chance First() and Last() can accept a count argument? So first/last 5 items, with the number either hardcoded or coming from another field?

Also any progress on the [self-referencing in formulas](https://community.fibery.io/t/siblings-as-children-of-parents-filter-self/981)?

> [@\[DONE\] Siblings as Children of Parents: filter self](https://community.fibery.io/t/done-siblings-as-children-of-parents-filter-self/981/2):
>
> Is self-referring on the horizon?

It would really make the new array functions powerful (e.g. to find that last meeting, filter all meetings prior to this meeting and return the first one)

---

<div class="post-metadata">

### Author: ![antoniokov](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/antoniokov/32/201_2.png) [@antoniokov](https://community.fibery.io/u/antoniokov)
#### Post date: [October 27, 2021, 6:31pm UTC](https://community.fibery.io/t/changelog-oct-27-sort-and-first-in-formulas-undelete-types-and-fields-delete-workspace-pen/2156/4 "2021-10-27T18:31:47Z")

</div>

> [@cannibalflea](#):
>
> This is such an important addition. Any chance First() and Last() can accept a count argument? So first/last 5 items, with the number either hardcoded or coming from another field?

Could you please share the scenario behind this?

> [@cannibalflea](#):
>
> It would really make the new array functions powerful (e.g. to find that last meeting, filter all meetings prior to this meeting and return the first one)

Agree about self-referencing Formulas in general.  
Where would you get all the meetings from though? 🙂  
This looks like a task for a Rule with a Find step (coming later 🤞) rather than for a Formula.

---

<div class="post-metadata">

### Author: ![Matt\_Blais](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/matt_blais/32/1464_2.png) [@Matt\_Blais](https://community.fibery.io/u/Matt_Blais)
#### Post date: [October 27, 2021, 6:47pm UTC](https://community.fibery.io/t/changelog-oct-27-sort-and-first-in-formulas-undelete-types-and-fields-delete-workspace-pen/2156/5 "2021-10-27T18:47:25Z")

</div>

In a different context, I would use a `"Top (n) Entities"` function thus:

Once we have Blocks, define the contents of a Block with a Formula/Rule to:

- _transclude here the “Description” fields of the five most recently created Meeting Notes entities._

I.e., synthesize a “running view” of the (hopefully editable) RichText content from just the five most recent Meeting Notes.

Because looking at a single Meeting Notes entity does not give enough history for many purposes, and conversely we don’t want a view that pulls in all 800+ past meetings.

---

<div class="post-metadata">

### Author: ![cannibalflea](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/cannibalflea/32/318_2.png) [@cannibalflea](https://community.fibery.io/u/cannibalflea)
#### Post date: [October 27, 2021, 7:13pm UTC](https://community.fibery.io/t/changelog-oct-27-sort-and-first-in-formulas-undelete-types-and-fields-delete-workspace-pen/2156/6 "2021-10-27T19:13:22Z")

</div>

> [@antoniokov](#):
>
> Could you please share the scenario behind this?

One of the areas I was thinking of using this is to actually select top five incomplete tasks for a project at our weekly standup meeting. I have a scoring formula and was thinking that it would be really helpful to filter out incomplete tasks (doable right now) and then sort by rating and return top five. I can always pull up a filtered/sorted board for this but having this as part of the meetings notes is quite helpful.

> [@Matt\_Blais](#):
>
> Once we have Blocks, define the contents of a Block with a Formula/Rule to:
> 
> - _transclude here the “Description” fields of the five most recently created Meeting Notes entities._
> 
> I.e., synthesize a “running view” of the (hopefully editable) RichText content from just the five most recent Meeting Notes.

I also agree with @Matt_Blais in that once blocks are available, it would be great to be able to basically run a query for top five requests, top five tasks, etc.

> [@antoniokov](#):
>
> Where would you get all the meetings from though? 🙂  
> This looks like a task for a Rule with a Find step (coming later 🤞) rather than for a Formula.

I have a “meeting type” type where I group meetings together and was really thinking it would be good to have the formula return the previous meetings automatically. So the formula I thought would look like:

```auto
[Meeting Type].Meetings.Filter(Date < this.Date).Sort(Date, false).First()

```

The only thing missing is `this.Date` which should return the date for the current meeting.

I don’t know if that makes sense.

---

<div class="post-metadata">

### Author: ![Matt\_Blais](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/matt_blais/32/1464_2.png) [@Matt\_Blais](https://community.fibery.io/u/Matt_Blais)
#### Post date: [October 27, 2021, 7:20pm UTC](https://community.fibery.io/t/changelog-oct-27-sort-and-first-in-formulas-undelete-types-and-fields-delete-workspace-pen/2156/7 "2021-10-27T19:20:04Z")

</div>

Perhaps `First()` could be extended to take an argument: `First(5)`

---

<div class="post-metadata">

### Author: ![antoniokov](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/antoniokov/32/201_2.png) [@antoniokov](https://community.fibery.io/u/antoniokov)
#### Post date: [October 27, 2021, 7:30pm UTC](https://community.fibery.io/t/changelog-oct-27-sort-and-first-in-formulas-undelete-types-and-fields-delete-workspace-pen/2156/8 "2021-10-27T19:30:37Z")

</div>

> [@Matt\_Blais](#):
>
> Once we have Blocks, define the contents of a Block with a Formula/Rule to:
> 
> - _transclude here the “Description” fields of the five most recently created Meeting Notes entities._
> 
> I.e., synthesize a “running view” of the (hopefully editable) RichText content from just the five most recent Meeting Notes.

We have an organic solution for this in the backlog with a codename `Feed View`, stay tuned 😉

> [@cannibalflea](#):
>
> One of the areas I was thinking of using this is to actually select top five incomplete tasks for a project at our weekly standup meeting. I have a scoring formula and was thinking that it would be really helpful to filter out incomplete tasks (doable right now) and then sort by rating and return top five. I can always pull up a filtered/sorted board for this but having this as part of the meetings notes is quite helpful.

Yep, this definitely sounds like a View. A Context View you can put right inside your meeting notes. Again, part of the Blocks initiative.

```auto
[Meeting Type].Meetings

```

This is already too much to ask, unfortunately. Just imagine how often the Formula has to recalculate — this scenario begs for Rules 🙏

> [@Matt\_Blais](#):
>
> Perhaps `First()` could be extended to take an argument: `First(5)`

Fibery Formula functions always return a predictable kind of result. This means `First()` can’t sometimes return a single Entity and sometimes a collection — otherwise chaining like `.First().Name` won’t be possible.

We can create a separate function though. So far it seems like it will bring more harm than good but we are eager to see more scenarios.

---

<div class="post-metadata">

### Author: ![cannibalflea](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/cannibalflea/32/318_2.png) [@cannibalflea](https://community.fibery.io/u/cannibalflea)
#### Post date: [October 27, 2021, 7:53pm UTC](https://community.fibery.io/t/changelog-oct-27-sort-and-first-in-formulas-undelete-types-and-fields-delete-workspace-pen/2156/9 "2021-10-27T19:53:18Z")

</div>

> [@antoniokov](#):
>
> This is already too much to ask, unfortunately. Just imagine how often the Formula has to recalculate — this scenario begs for Rules 🙏

I see what you are saying and it makes a lot of sense 🙂 I will set it up like that 🙏

---

<div class="post-metadata">

### Author: ![Matthew\_Oates](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/matthew_oates/32/4209_2.png) [@Matthew\_Oates](https://community.fibery.io/u/Matthew_Oates)
#### Post date: [October 27, 2021, 7:53pm UTC](https://community.fibery.io/t/changelog-oct-27-sort-and-first-in-formulas-undelete-types-and-fields-delete-workspace-pen/2156/10 "2021-10-27T19:53:39Z")

</div>

I’m just thrilled to even have first() and last(). Thanks dev team!!!

---

<div class="post-metadata">

### Author: ![B\_Sp](https://avatars.discourse-cdn.com/v4/letter/b/e8c25b/32.png) [@B\_Sp](https://community.fibery.io/u/B_Sp)
#### Post date: [October 28, 2021, 8:58pm UTC](https://community.fibery.io/t/changelog-oct-27-sort-and-first-in-formulas-undelete-types-and-fields-delete-workspace-pen/2156/11 "2021-10-28T20:58:19Z")

</div>

> [@mdubakov](#):
>
> ## Sort(), First() and Last() in formulas 🥇
> 
> Now you can do clever things with collections, like sort them and extract the first or last element.
> 
> ```auto
> Epics.Sort(Name).First().Name
> 
> Companies.Sort([Creation Date], false).First().Contacts.Count()
> 
> Companies.Sort(Name).First().Country.Name
> 
> ```

Hey, sorry if this should be obvious, but how do you access this in Collections? I was looking for a new option in my Collections but I don’t see anything. By “Collections” I’m referring to the area in an Entity where you see related entities from a Type that are children of the said Entity.

Thanks!

---

<div class="post-metadata">

### Author: ![Matt\_Blais](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/matt_blais/32/1464_2.png) [@Matt\_Blais](https://community.fibery.io/u/Matt_Blais)
#### Post date: [October 29, 2021, 4:17am UTC](https://community.fibery.io/t/changelog-oct-27-sort-and-first-in-formulas-undelete-types-and-fields-delete-workspace-pen/2156/12 "2021-10-29T04:17:41Z")

</div>

@B_Sp, Use these in a formula. For example, if your “children” are in a collection called `myKids`, use a formula field to do something like:

`myKids.Sort([Creation Date], false).First()`

This Formula field should then become a “to-one” reference (not a collection) to one of the entities in `myKids`.

---

<div class="post-metadata">

### Author: ![B\_Sp](https://avatars.discourse-cdn.com/v4/letter/b/e8c25b/32.png) [@B\_Sp](https://community.fibery.io/u/B_Sp)
#### Post date: [November 2, 2021, 2:41am UTC](https://community.fibery.io/t/changelog-oct-27-sort-and-first-in-formulas-undelete-types-and-fields-delete-workspace-pen/2156/13 "2021-11-02T02:41:33Z")

</div>

Thank you @Matt_Blais! That is simply too technical for us to use right now. Over time I hope Fibery can develop a simple filter/sort dialog next to the “Collections” area within entities that anybody could set up as simply as in Excel, or even the existing sort/filter we have in Fibery when it comes to Table View. I assume @antoniokov you guys are open to developing this functionality in a more user-friendly way down the road in the not-too-distant future? Being able to easily control what shows in Collections, like only “done” tasks within a Project, would really be a big piece of making Fibery more accessible to mass users I think!

Thanks!

---

<div class="post-metadata">

### Author: ![Jean](https://avatars.discourse-cdn.com/v4/letter/j/fbc32d/32.png) [@Jean](https://community.fibery.io/u/Jean)
#### Post date: [November 2, 2021, 11:03am UTC](https://community.fibery.io/t/changelog-oct-27-sort-and-first-in-formulas-undelete-types-and-fields-delete-workspace-pen/2156/14 "2021-11-02T11:03:11Z")

</div>

Any thoughts of enabling formulas in “Rich text” or Documents? this would be really cool to generate more readable and dynamic data

---

<div class="post-metadata">

### Author: ![mdubakov](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/mdubakov/32/10_2.png) [@mdubakov](https://community.fibery.io/u/mdubakov)
#### Post date: [November 2, 2021, 11:08am UTC](https://community.fibery.io/t/changelog-oct-27-sort-and-first-in-formulas-undelete-types-and-fields-delete-workspace-pen/2156/15 "2021-11-02T11:08:42Z")

</div>

Most likely it can be a separate block, implementing this inside rich edit is harder. What are your cases?

---

<div class="post-metadata">

### Author: ![Jean](https://avatars.discourse-cdn.com/v4/letter/j/fbc32d/32.png) [@Jean](https://community.fibery.io/u/Jean)
#### Post date: [November 2, 2021, 11:28am UTC](https://community.fibery.io/t/changelog-oct-27-sort-and-first-in-formulas-undelete-types-and-fields-delete-workspace-pen/2156/16 "2021-11-02T11:28:38Z")

</div>

Building ingestable summaries/reports to send to our team and partners, either sharing the doc or by sending them in a weekly email. It’s more about formatting a readable content:  
For ex. last month we did X amount of sales at Y % conversion rate. Top 5 partners are x, y, z (or a list) etc

---

<div class="post-metadata">

### Author: ![antoniokov](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/antoniokov/32/201_2.png) [@antoniokov](https://community.fibery.io/u/antoniokov)
#### Post date: [November 2, 2021, 11:31am UTC](https://community.fibery.io/t/changelog-oct-27-sort-and-first-in-formulas-undelete-types-and-fields-delete-workspace-pen/2156/17 "2021-11-02T11:31:01Z")

</div>

> [@B\_Sp](#):
>
> Being able to easily control what shows in Collections, like only “done” tasks within a Project, would really be a big piece of making Fibery more accessible to mass users I think!

Yep, we are most likely to replace the hardcoded Collections with Context Views in the scope of Blocks initiative. This means filters, sorting, color coding — everything that comes with proper Views.

> [@\[DONE\] Embed Custom Views into Entity View](https://community.fibery.io/t/planned-embed-custom-views-into-entity-view/936/6):
>
> Good point Chris. I would also point out that @mdubakov has discussed that he plans to allow 100% configurable the #mention of the other entity, which would be a real move forward on other apps such as Jira that just show a static amount of info of issue ID, name, state. Currently we have that, plus assignee, but if you could configure (I’m guessing here) to add even Rich Text out of an entity, this almost accomplishes embedding. If you could then pop open those fields, modal-style, without …

---

<div class="post-metadata">

### Author: ![Matt\_Blais](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/matt_blais/32/1464_2.png) [@Matt\_Blais](https://community.fibery.io/u/Matt_Blais)
#### Post date: [November 2, 2021, 2:08pm UTC](https://community.fibery.io/t/changelog-oct-27-sort-and-first-in-formulas-undelete-types-and-fields-delete-workspace-pen/2156/18 "2021-11-02T14:08:26Z")

</div>

> [@antoniokov](#):
>
> Yep, we are most likely to replace the hardcoded Collections with Context Views in the scope of Blocks initiative. This means filters, sorting, color coding — everything that comes with proper Views.

That will be HUGE 😍😍😍

---

<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: [January 6, 2023, 8:29pm UTC](https://community.fibery.io/t/changelog-oct-27-sort-and-first-in-formulas-undelete-types-and-fields-delete-workspace-pen/2156/19 "2023-01-06T20:29:04Z")

</div>

Has anything changed with the Undelete Fields/Apps functionality?  
I have an error that an essential field has been deleted but no ability to recover it from the trash bin. I am an administrator.

---

<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: [January 7, 2023, 10:21am UTC](https://community.fibery.io/t/changelog-oct-27-sort-and-first-in-formulas-undelete-types-and-fields-delete-workspace-pen/2156/20 "2023-01-07T10:21:45Z")

</div>

Is the deleted field not showing in the trash bin / audit log, or can you see it but not able to restore it?  
Perhaps some screenshots will help…

[Next page](https://community.fibery.io/t/changelog-oct-27-sort-and-first-in-formulas-undelete-types-and-fields-delete-workspace-pen/2156.md?page=2)
