Query a tab structure for a select


i have a tab called “configurator” in the site.yml where a user can create screens. Inside a screen he can create buttons and link them to other screens. I can’t find out how to query the allready existing screens to populate the select box.

    label: Configurator
    icon: cog
        label: Screens
        type: structure
            label: Title
            type: text
            label: Buttons
            type: structure
                label: Button Title
                type: text
                label: Next Screen
                type: select
                  query: site.tabs.find('configurator').fields.screens.toStructure()
                  value: "{{ option.id }}"
                  text: "{{ option.title }}"

What am i doing wrong?

Thank you in advance.

See docs: Select | Kirby CMS

Thank you, i allready saw this page in the docs, but i can’t find out what i am doing wrong which is the reason why i am asking in the forum.

found the problem with chat gpt. thanks anyways.

Oh, I see, you are trying to select stuff inside a nested structure field. Apart from the fact that all fields are equal (no matter the tab in which they live), I’m afraid this will not work as expected, because the page would have to be saved before you can access stuff from the same page.

1 Like

Thank you. Yes i was clear about that the screens needs to be saved before. The query was wildly wrong. I need to dive deep into querying all the posibilities in kirby again.