Allow Switch' Component in Series or Back-to-back

Hello I have a use case in which I would need to use multiple switch components for different variables in series or back-to-back.

An example of my use case is to SWITCH ‘if language is set’ and then SWITCH if a UserSession exists.

For example currently React Studio allows:

(App Settings)->(SWITCH)->(Screen1)

But my use case would need:

(App Settings)->(SWITCH)->(SWITCH)->(Screen1)


We’ll take a look if one could add other Switch as Target screen in Switch. Currently it’s limited to screen blocks only.

P.S. You could probably do this already with a script in Switch…

Something like this:

// let userSession="";
// userSession=this.props.appActions.dataSlots[‘ds_userSession’];

// let language="";
// language=this.props.appActions.dataSlots[‘ds_language’];

if (language == “en” && userSession != “”) {
// Go to screen ‘Start’
this.props.appActions.goToScreen(‘start’, { transitionId: ‘fadeIn’ });

@Antti_Neonto how do you add scripts in a switch? I press the Edit Script CTA but nothing opens :confused:

This is a bug in UI. Will fix in the next release.

1 Like