Go from one form to another and show original form upon return

My post is related to
related post but it is a bit more complicated. In the referred post you go from FormA to FormB back to formA without a parent child relation.

In my situation I go from FormA to RowDetails (=child) to FormB and back to FormA via RowDetails. However I loose the context of FormA somewhere, because FormA is not shown on re-entrance.

In more details:
I have a FormA which uses repeating panels to build and show a set of repeating detail lines:
self.repeating_panel_detailform.set_event_handler('x-refresh-detailA_lines', self.refresh_detailA_lines)

In self.repeating_panel_detailform a link is made to item_template to FormA.RowDetails. In this component is defined how the repeating rows are shown. Each row shows one button. If the button is clicked FormB is opened:
open_form('FormB', self)

In FormB variables from the RowDetails are available because self is included. In the init of FormB:
def __init__(self, calling_form, **properties): self.calling_form = calling_form

After modifiying a variable, FormB returns to the calling form, which is RowDetail:
open_form(self.calling_form)

RowDetails should now return to FormA with the modified variables shown in one of the repeating lines. My problem is how do I return to FormA, which shows both FormA and the modified repeating lines?
I tried inside RowDetails:
def form_show(self, event_args): self.parent.raise_event('x-refresh-detailA_lines')

This way returns me to FormA where the function refresh_detailA_lines is executed. But the result on screen shows only one RowDetails line and not FormA.

How do I refresh the original FormA content again on the screen? If I use open_form(‘FormA’) it will create a new instance and I loose the context anyway because init is carried out again.

PS In the code examples above I couldn’t create a newline… looks a bit clumsy now

Do provide a clone link if you can. It’ll help to see the explanation in context.

I know, however I have to specially recreate the situation in a stripped example. I hoped my question would have been clear enough. I will try to make a clone tomorrow (that’s actually today already :blush:)

Hi Stucork,

I created an example of my problem. I want to return to FormA after the calculation, but I get stuck in the repeating panel Row form.

Any help is appreciated:

Replace open_form('FormB', self)

With open_form('FormB', get_open_form())

this will make the calling_form the top level form. At the moment calling_form is a repeating panel row template form.

Ah, that helps! Thanks.