Hi.
So i have 2 blocks that have the same parent block. Let´s called block1 and block2, i need to pass info from block1 to block2, but when i do that i don´t want to lose the info that i already have in block2. In reactive, we have the OnParameterChange, but in Traditional we don´t. Do you know how to create something identical? because if i use "Ajax Refresh" when the event on block1 occurs, i lose all the info.
Hello Ana,
For traditional web, the typical practice would be to use the Event System Forge component (https://www.outsystems.com/forge/component-overview/597/event-system)
You could also consider using JavaScript to pass the information, but that is less ideal.
I'll see about putting together a sample.
I can´t use components from Forge, don´t have permissions for that. Do you mind explain me how to do that with JS?
Thanks
That's unfortunate, the Forge has a lot of very valuable and useful components.
This example here uses blocks, passes first name from block 1 to block 2, uses no Forge components and no JavaScript and does not refresh the data in Block 2.
I wonder if your Block 2 data is being cleared by your Preparation?
Here is an updated example that shows 2 ways of doing it. Sorry, my Traditional Web is a bit rusty ;)
I strongly advise you do not go the JS route. It is cumbersome and adds way more complexity that needed. If your Block2 needs to do things in its Preparation, maybe consider adding some conditions to see if that block has already been initialized.
Hope this helps