How to get values of another field (toStructure) by query?

I want to have tags in Project template (that is child of “Projects”).

So I added field “tags” in Projects, and in Project blueprint I added field:

  tags:
    type: checkboxes
    options: query
    query:  page.parent.tags.toStructure

Can’t find out what is missing, as it prints blank values:

tags

And in content file it saves only number:

tags1

Can you please guide me how this syntax works? I was learning by these examples https://getkirby.com/docs/guide/blueprints/query-language#querying-options-in-fields but still can’t understand the whole picture.

1 Like

Ah, clear, here is what I needed: structureItem (thought should be tags there). Changed and now it works, thank you!

query:
  fetch: page.parent.tags.toStructure
  text: "{{ structureItem.tag }}"
  value: "{{ structureItem.tag }}"