Sorting database alphabetically using reference field

Hi there,

I’d like to sort my database of photos using a reference field. The reference field belongs to another database of individuals. How can I sort my photos in the database so they are grouped by the individuals of the reference field (and thus allow me to work on them ‘backstage’ in the database, putting them in order and giving them captions etc)? The sorting and filtering options given for the reference field are only to sort or filter by whether or not the field is empty, as far as I can see. Ideally I’d like to sort the database so that it is arranged alphabetically by the individuals the photos belong to.

Please help.

Many thanks.

Hi!

Through your database collection you have an option to “sort”.
Simply choose which field to sort by and what sorting method you prefer and there you go!


Hope it helps!

Doron. :slight_smile:

I know that. But you cannot sort by a reference field! (Unless I am missing something big). The reference field does not show up in the list of fields to sort by in my photo database. It is a set of drop down options that come from another database (the individuals database). Please help!

Hi!

Have you tried doing it via code using the sort() method?
If you have, please share with us a link to your site and one of us, Wix Code Team, will inspect it and provide you with a solution as soon as we can.

Doron. :slight_smile:

Hi Doron, i have tryied using sort() method for field in referenced table, but it doesn’t work
Can you help us?