Query pages field inside structure

Hi there,
i have a problem with a query of a pages field and after hours and hours: I need your help! :wink:

I build a menu builder (2 level menu, but with some specials) with a structure field (select mainpage-Item) and a second structure field this structure for selecting the subpage-Items and some more stuff. No I want the pages field where you can select the subpages to show only subpage of the main page which is selected in the pages field of the first structure field? Is it possible? Du you understand? My english is not the best…

Best regards, Matthias

Yes, I understand but this is not possible out of the box and would need a combined custom field where the second listens to changes in the first (in the Vue part of the Panel). So nothing straightforward)