# Query filterby pages select field

**URL:** <https://forum.getkirby.com/t/query-filterby-pages-select-field/34541>\
**Category:** Questions\
**Tags:** v4\
**Created:** [August 4, 2025, 12:53pm UTC](https://forum.getkirby.com/t/query-filterby-pages-select-field/34541 "2025-08-04T12:53:06Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Studio.dier](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/studio.dier/32/11289_2.png) [@Studio.dier](https://forum.getkirby.com/u/Studio.dier)\
**Post date:** [August 4, 2025, 12:53pm UTC](https://forum.getkirby.com/t/query-filterby-pages-select-field/34541/1 "2025-08-04T12:53:06Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![distantnative](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/distantnative/32/11319_2.png) [@distantnative](https://forum.getkirby.com/u/distantnative)\
**Post date:** [August 4, 2025, 1:10pm UTC](https://forum.getkirby.com/t/query-filterby-pages-select-field/34541/2 "2025-08-04T13:10:59Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Studio.dier](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/studio.dier/32/11289_2.png) [@Studio.dier](https://forum.getkirby.com/u/Studio.dier)\
**Post date:** [August 4, 2025, 1:52pm UTC](https://forum.getkirby.com/t/query-filterby-pages-select-field/34541/3 "2025-08-04T13:52:57Z")

</div>

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

```javascript
…
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.

---

<div class="post-metadata">

**Author:** ![distantnative](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/distantnative/32/11319_2.png) [@distantnative](https://forum.getkirby.com/u/distantnative)\
**Post date:** [August 4, 2025, 1:56pm UTC](https://forum.getkirby.com/t/query-filterby-pages-select-field/34541/4 "2025-08-04T13:56:23Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Studio.dier](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/studio.dier/32/11289_2.png) [@Studio.dier](https://forum.getkirby.com/u/Studio.dier)\
**Post date:** [August 4, 2025, 2:00pm UTC](https://forum.getkirby.com/t/query-filterby-pages-select-field/34541/5 "2025-08-04T14:00:21Z")

</div>

This:  
**- ‘page://ULg9uFpQ5F1zYBDp’**

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