Clicking Button in Child Web block

Consider a situation where I am having a web block consisting of two buttons: "Okay" and "Cancel". Now this web block has been used in a parent screen twice inside two separate container.

What i want to achieve is, If i click the "Okay" Button in the first instance of the web block on the parent screen, the cancel button of the second instance of the web block should also get clicked automatically. The below given diagram illustrates the problem:

How can I achieve this?

Hi, I think you should use Notify or event (based on your OS version) in one block and to notify the other block. 


I'm guessing you don't have issues with notifying the parent of the button selected.

The second part is easier.

The Notification Handler on parent will know which block was changed. That action will refresh both webblocks with a new input, setting the default value. The selected receives "Ok". The other receives "Cancel".

Or just check this article



Perhaps if you add a input variable that tells the preparation from the web block to optionally run the same code as one or other of the buttons.  Then when a button is clicked on an instance, refresh the "other" web block sending it the information of the part of the code to run.

just an idea.