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


#1

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.


#2

For example currently React Studio allows:

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

But my use case would need:

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


#3

Hi,

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’ });
}