HOW TO PASS DATA FROM ONE WEB BLOCK TO ANOTHER

I have 2 web blocks (Person detail web block) and (upload image web block) as shown below.

When i click "Update profile image" on the person detail web block it opens the upload image web block.

After selecting a new image and updating the image on this web block, how then do i pass the details back to the person detail web block so that it shows the new image.

My upload image functionality is also shown below. I understand i have to use notify functions but i'm stuck pls help

NB: I'm using V10 not v11

Solution

Hey,

Do you need to pass details? To me it just looks like you need to let the parent webblock know that it has to refresh. You'd send a message with the Notify action in the Child webblock:

And then in the Parent webblock, you'd read it with NotifyGetMessage and execute your refresh logic if the message matches with what you expect:

Note that you should only use the Notify family of actions if you haven't updated to Outsystems 11! Outsystems 11 deprecates all of these actions and implements a true event system for webblocks:

https://success.outsystems.com/Documentation/11/Developing_an_Application/Design_UI/Reuse_UI/Use_Events_to_Propagate_Changes_From_a_Block_to_the_Parent

Solution