# Sort and filter on the Lookup field

**URL:** <https://community.fibery.io/t/sort-and-filter-on-the-lookup-field/3788>\
**Category:** Get Help\
**Created:** [January 9, 2023, 1:31pm UTC](https://community.fibery.io/t/sort-and-filter-on-the-lookup-field/3788 "2023-01-09T13:31:14Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Sev](https://avatars.discourse-cdn.com/v4/letter/s/90db22/32.png) [@Sev](https://community.fibery.io/u/Sev)\
**Post date:** [September 5, 2025, 1:59pm UTC](https://community.fibery.io/t/sort-and-filter-on-the-lookup-field/3788/5 "2025-09-05T13:59:56Z")

</div>

I hope you do not mind the reopening of this topic, but I believe this is very closely related.

✅ I love that the **return type of a formula can be an entity type** , which turns it into a **filterable and sortable lookup by formula**.

For example, on the Accounts table, to lookup its Operational Roles sorted ascendingly by the name of the Contact connected to the Role:

```auto
Roles.Filter(Lower([Role Type].Name) = "operations")
  .Sort(Contact.Name, true)

```

❌ The problem is that **the sort is not respected in the field’s UI**. But of course the formula itself does return it sorted, as we can confirm if we return the value as a joined text field by adding `.Join(Contact.Name, ",")`.

```auto
Roles.Filter(Lower([Role Type].Name) = "operations")
  .Sort(Contact.Name, true)
  .Join(Contact.Name, ",")

```

---

_[View the full topic](https://community.fibery.io/t/sort-and-filter-on-the-lookup-field/3788)._
