Avoid Refresh Data on Wizard Navigation

I have this issue on Wizard Navigation, if I change the data in the first into and go the second item on wizard, if I return to first item the changes are lost.

Basically the wizard is doing refresh data on the items I have on it. I am doing a simple test by changing the first item value (booking detail) and the switch to the second item (documents) if I return to the first tab item (booking detail) all the changes are not there anymore. How can I prevent from refreshing data while changing the tabs on wizard?

The OML is attached.

Bookings.oml

@Marco Silva
The wizard is doing the refresh because in reactive when you change a variable it will refresh automatically in the screen, and so by changing the stepCode, another block will be displayed (due to your if condition) and refreshed.

What I suggest you do in this case, is saving the info you just changed in the Client block right when you are about to leave the block.
If you fill some info in the first section and click in the navigator to go to the second section, the OnDestroy event of your first block will be triggered. In there, you can Update the value of your Client record in DB so that when you go back to that section and the block intializes and fetches values from the DB, it will already fetch the latest values.

Take a look at the screenshot:


Hope this helps!
Cheers,
Paulo

Thanks for the answer however I cannot save this on database, at least not at these steps only in the final step 3 is when I will have a button to submit.

Is there a way of keeping the changes without doing an update?

Hi Marco,

You can serialize the data and can store in the Client Variable and again when you come back on the form you can deserialize  it and can show it 

Below is the working URL and attached is the oml

https://dbaghel.outsystemscloud.com/Bookings/BookingsDetail?BookingId=1 

Best Regards

Devendra


Bookings.oml

Hi Marco,

the cause of this is that you have the forms inside a webblock, and webblocks inside an if, are removed from the DOM on False, and added again on True, at that point the webblock is running all its events from the start, so it is executing the aggregate retrieving data from the database.

You don't really need to serialize and save data into client variables for this.  If you want to stick to the design of having the different parts of your detail screen in a separate webblock, you take them outside of an if, and give the container they are in a dynamic style of 'display: none', either by an inline style or a class.  

with an inline style :

with a class :

Contrary to an If widget or the Visible property, this does not remove your webblock from the DOM, and so on becoming visible again, it doesn't refresh data but is still showing what you have changed.

Dorine

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.