How do you update a textfield on a view from a container button

Newbie question here, but been searching the docs trying to find out how to do this. I have a view and a container on it, there is a button on the container which when pressed I need to update some data on the main screen then hide itself.

I cannot do

The title of the thread and your code don’t match.
It is unclear if the TextField is in the same container as the button.

Same container

textfield1.text = "Data"

Different containers
You could add an Event definition to the button’s container.
Then handle the event in your View to update the TextField.

Or you could also use a delegate, but this seems a bit far fetched in your case.

This may not be an elegant way to do it but I create an App property “pView1” as View1.
The View1.Open event has the code: app.pView1=me.
Now to write to the textField in View1 the container button Action code: app.pView1.textfield1.text=“Data”