Sorting by `link_row` (Link to table) field

It would be nice to be able to sort records in a view according to the cell value of the link_row (Link to table) field. At the moment, that field-type is not present in the list of fields to sort on.

Requirements

  • The rows must be sorted by the cell value of the primary field in the related table.
  • The rows must be sorted alphabetically, based on the visible string value of the items.
  • It must be compatible with all the primary compatible field types.
  • The sorting process is similar to the multiple select field, but than with the requirement of having dynamic primary field cells instead of select options. We have figured out a lot of edge cases there, so please take a look how that works.

Bonus

  • If it's not too many changes, we might immediately want to make it possible to group by the link_row field as well. See #2306 (closed)
Edited by Bram Wiepjes