Query filterby pages select field

I’m having issues with my queries.

I have two pages: ‘locations’ and ‘program’.

Both have children. Each program-item has a select-field for selecting a location where this program-item takes place.

Now I need to create a query for my locations-page that filters all the program-items that have the current location set. I’ve tried this:

site.page("event/program”).children.listed.filterBy(“location”, “page.id”)

page.id refers to the location-page which wraps this ‘programs’ child query.

But that would be too easy, I guess?

Wrapping page.id in quotes will turn It into a simple string - but you want it as query, so drop the quotes there. Second, check if on your program pages the location field really stores the page id and not a UUID or something else.

well, I’m using Nuxt/vue in my frontend and try to

…
programs: {
query: 'site.page("editions/abrupt-2025/program").children.listed.filterBy("location", page.id)',
select: {
title: true,
date: true,
location: 'page.location.toPage.title',
},
},
…

but both ‘id’ and ‘uuid’ don’t seem to work.

Have you checked what the field value of location actually looks like?

This:
- ‘page://ULg9uFpQ5F1zYBDp’

so I’m assuming uuid would have to do the trick(?)