Books by French authors: a condition through a reference

A shelf of French literature. Nationality lives on the Author, not on the Book, and nobody wants to copy it across 328 entries.

The list

In the app this list is called By French authors.

The list in the editor, with the preview it produces.

What it says

Take every Book. Keep the ones whose Author’s Nationality is “French”. Sort by Title, A to Z. No limit.

On the storefront

In the field menu a reference field expands to show the fields of the type it points at, written Author › Nationality. The app follows the reference and tests the value on the author entry. This works for single and list references, one level deep: for a list reference the condition is true if any referenced entry matches.

The French shelf on the every-book page.

In your store

Products by brand attribute, recipes by cuisine of the chef, stockists by the region of their city. Whenever you find yourself wanting to duplicate a field onto a child type just to filter by it, this is the condition instead.