Write to a structured field

I have a page and a controller page. With filling a form on the template i write to a structured field on the controller page.

It works, but after reload the page the data ist not actual! I have to refresh the page again.

Frontend or Panel?

Frontend.

I have users with structured fields (Fahrstunden). I put the values of this fields together in a collection to filter them.
Some Users can change the values of this fields. After a change is made i write the fields back in to the structured fields.

Like this: $kunde->update([‘meine_fahrstunden’ => Yaml::encode($neueFahrstunden)]);

Not sure I completely understand the workflow completely with the page and the controller page and the reloading.

Is the page that is not updated correctly cached?

in other scenarios i had similar things where i could not access the new information… i usually put the updated values in a new variable

$updatedKunden = $kunde->update([‘meine_fahrstunden’ => Yaml::encode($neueFahrstunden)]);
// proceed to use updatedKunden 

Creating a new variable here in the context of updating the page content after sending form values doesn’t help. What was needed here was to implement a Post-Redirect-Get pattern or to at least redirect the template.