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

Doubt.PNG

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

https://akshayproject.outsystemscloud.com/Rolecheck/toggleSwitch?In1=%7B%7D

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

ToggleSwitch.oml

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

https://akshayproject.outsystemscloud.com/Rolecheck/toggleSwitch?In1=%7B%22IsToggle1%22%3Atrue%7D

Hopes this will helps you,

Thanks and Regards,
Akshay Deshpande

ToggleSwitch.oml

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 ?

Dorine

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