Blueprint query using query syntax in Blocks Field between Tags Field and Select Field in a Structurer Field

Hi!

I am working on a project that uses Chart.js to display several charts on one page.

For this I have created a Custom block type with preview, which contains a Structure Field to save the data.

There are always the same Labels with different entries for each data set.
Up to now, the user can enter the Labels in a Text Field, but must repeat them for each data record.

So that the user does not always have to manually enter the same Labels in a Text Field for each data record (redundancy and susceptibility to errors), I would like to create a Tags Field with all possible Labels as shown in the screenshot.
These Labels should then be selectable in the Structure Field with a Select Field (Screenshot → Structure → Label), and not be filled by a Text Field as is currently the case.

I have already tried it with several queries in the blueprint, but have always failed so far.

Here is an example:

dataEntries:
        label: Data Entries
        type: structure
        required: true
        fields:
          label:
            label: Label
            # type: text
            #counter: false
            type: select
            options:
               type: query
               query: page.numbers.toBlocks.filterBy("type", "tags").split
  • Is there a way to accomplish this in Kirby?
  • Can the query with the query syntax in the Select Field of the Structure Field work at all if the block and thus the entries in the Tags Field for the Labels have not yet been saved?
  • And is it even possible to access values of another field in the custom block type within a Structure Field that is located within a custom block type using query syntax in the blueprint?

I would be very happy about your answers, and if all this is possible, I would be very happy about your help or hints regarding the implementation.

Thanks for your help,
Robert