Sort and filter on the Lookup field

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

:white_check_mark: 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:

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

:cross_mark: 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, ",").

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