Displaying structure into select Field

Hello evetybody… Sorry for bothering, first I spent 2 hours trying to solve my issue before posting…

I have structure like this:
n number of drafts pages in root

In each of theese pages, structure is like this

somepage
-- page1
  -- page1.yml
--page2
  -- page2.yml
--page3
  --page**3**.yml
--page4
  --page**3**.yml
--page5
  --page**3**.yml

inside page1.yml i have structure field like this

    fields:
      svasta:
        label: Angestellte
        type: structure
        fields:
          code:
            label: Name
            type: text
            icon: sort
            required: true
            counter: false

inside page3.yml
Im trying to put all entries from that structure field into select field like this

    fields:
      category:
        label: Category
        type: select
        options: query
        query:
          fetch: page.parent.drafts.find('Preise').svasta.toStructure
          text: "{{ structureItem.Title }}"
          value: "{{ structureItem.Code }}"

Find for example doesn-t work at all

find('Preise') looks suspicious to me; according to https://getkirby.com/docs/reference/objects/page/find “find” should get a uid/slug.

Also, you might try https://getkirby.com/docs/reference/objects/page/find-page-or-draft?

You have to provide the slug of the page you are looking for, and the slug is definitely lowercase, so cannot be “Preise”-

Hey something is happening… Im not getting error anymore, but i have blank options under select, and all fields above select dissappeared

2

Looks like I’ve managed it… it doesnt work with numbers, only strings