Dear All
There are two blocks inside the screen, Data is saved on 1st block and list is appeared in second block How to refresh the second block
Thanks
Jitesh
Hi,
i block rerenders whenever an input parameter changes. In case you do not have any data for the second webblock to pass in thus rerendering the block you could simply add a new boolean Input paramter to your block (eg. Toggle).
Bind that input parameter to a local variable of your screen.
In your webblock one add an event which you raise after saving the data.
In your screen handle the event and assign set your screen boolean value. e.g.. LocalToggle = not LocalToggle.
In your webblock 2 you can add an OnParametersChanged event to refresh data asf.
Best
Stefan
Hi Stefan,
Note that in order to re-render, you must handle the On Parameters Changed, or else nothing happens!
sorry. yes you are right, it should read you must add an OnParametersChanged event to refresh data asf.
Thanks for your help, there are the steps to use this solution.
You could have the first block send an event to the screen, and then have the screen refresh the second block by changing one of its input parameters, handling the On Parameters Changed of that block by refreshing the query. Since there's not a change in any real parameter, you must add some dummy parameter that you update (some counter, or a date/time or whatever).
I searched the forum to see if there's not a better way, but it seem there's not.
I just saw there's an Idea for this, so go upvote it :).
Hi there is this document that might be useful to read:
https://success.outsystems.com/Documentation/11/Developing_an_Application/Design_UI/Reuse_UI/Pass_Data_Between_Blocks
Hello @Jitesh As mentioned in above comments, I will explain you about it by taking some examplesFirst we will come to blocks
BlocksIf we want to Pass a Value from Block to Parent(parent can be another block or screen), the we create a Event on a Block that will behave as a medium and will help us to pass a value from Block to its parent.And When we have to pass any value from Parent to Block, in that case we will pass the value by taking Input parameter on a block and we will pass the value from the parent where the block is used,
Now Lets Come to your scenario
I hope you will have understood, by this exampleI am also attaching a Demo for you that might also help.Sample DemoBest RegardsTousif Khan