How to prevent screen changes from moving to next block

I have a web block with 8 toggles buttons each toggle button has two containers with some data if toggle is YES one container will show the data another will be hidden if the toggle turned to no first container will be hidden and second container will be shown this is same for the remaining 7 toggles also.

I have a next and back button if I made changes to this toggles and move to next block and coming back to this block means it needs to retain the changes that I have done. Mean while the containers also need to be positioned the same according to the toggles values.

* I should not use session or client variables I have used 6 adaptive/Gallery options for the screen so can't use entity type also


Hello vishnupriya sivashanmugam,

I have create sample OML only for retrieving that from next screen In Similar way if you do you will get answer
here I have attached OML and URL for you

Two Screen:

First Screen(Toggle switch):

With one input Parameter(non Mandatory),local  variable with the 8 Boolean values.
Please check the code of oninitialize,on the next click deserialize the data and pass as input to next screen

Second screen(toggleswitchnext) :

With one input Parameter(Mandatory),.
on the back click pass the input parameter again to that screen
(if you want Boolean value in this page also than do the same on initialize coding like first screen )

Thanks and Regards,
Akshay Deshpande


Hey Akshey,

Really thank you so much for your help. It got worked. thank you so so much.

I have following question If I add extra Boolean attributes to the same toggle variable but assigning them manually in some of the other widgets like containers means does it works like the same as toggle values? Because I tried it but that's not working in the same manner.

Please don't used extra Boolean variable used only that which we were using I have again attached Update OML and please check URL also

Hopes this will helps you,

Thanks and Regards,
Akshay Deshpande


Hi guys,

although this works, there are problems with this.

This is not scalable, it will only work as long as there are a limited number of screens that you could go to from screen1, as it relies on passing back and forth information to remember stuff for screen1.  Also if screen2 would go to a screen3 at some point, there will be no other option than to even pass same info to screen 3.  

This goes against best practice of separation of concerns, it is not the job of a screen to persist choices made on some other screen.

Why are you saying you don't want to use session or client variables ?


Hi Dorine,

As like you mentioned I'm facing some regarding the above solution. It relies the value until the page gets refreshed but it should no in my case. It should not hold the value when we get into the screen from main page. I should relies the value only when the next and back is clicked.

The reason I mentioned I can't use session and client variables is my organization is not letting me to use those. It's prohibited for us.

Is there any way to refresh the values once it comes from the main page.

Thanks in advance


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