Fetch files based in page selected in other field

Is it possible to choose page in one field and fetch files in other field from the choosen source page?
The goal is to create curated collection of downloads from products pages on downloads page.

Example:

selectpage:
    type: page
    query: site.find("products")
    multiple: false
file:
    type: files
    multiple: false
    query:
        fetch: site.find("{{ selectpage }}") #not sure about this

I could eventually load the files to a select field, but the question remain the same. Is this even possible?

That’s not possible, because the second field would only know the selected value once you save the page.

You would need a custom field that listens to the first field and updates its option based on that.

Thanks. I will find out another solution to do that.