Fill edit-form through popup

I have an edit-form in which I have a button which itself opens a popup and shows a country selection.
When selecting a country in my popup I would like to prefill (not save) my edit-form (multiple fields) after closing the popup.
How can I do this? I do not want to use parameters because they can't be optional, but I assume the context of the underlying page is still there? Where could I find an example of such a thing?

Hi @Moo,

You can specify result when closing the popup like this:

and use the result in you Edit/Add popup page:

(result is the entire Customer object in this case)

1 Like

Thank you for the nice example. Just one more detail:
when I come back from my closing-popup-event there is no event which triggers, sooo at which point should I fill my form? Should the popup-closing event trigger the load of the form again? Or can the popup access the context of the underlying pages formfields?

The result is available in the Then of the Open Dialog action:

1 Like

I realized I do not need another event, I can just overwrite my form-values in the then-option of the open-with-dialog like so:
this.exhibitor.CountryISO = ${result.CountryCode}

Now that I see it working it sounds very reasonable, I just didn't think of editing my form while 'navigating' TO the popup.

Thank you