Switch widget on webscreen - Service Studio improvement.

By Luis Paulo Soares on 25 May 2012
As NextStep 2012 says 'Simplicity'.

A switch widget on a webscreen will make the web screens more simple to understand!
See idea: 1015
Hugo Almeida20 Jan 2012
Add a new widget for switch control statement at the screen flow.

Instead of nested if widgets, why not a switch widget to be used on the screen?


Merged from 'Switch control statement at the screen flow.' (idea created on 2012-01-20 16:34:18 by Hugo Almeida), on 2014-01-24 12:37:19 by Gonçalo Borrêga
Miguel Melo21 Jan 2012
Though adding a new widget to the platform is always a complex affair (it needs to go through deep evaluation by R&D) I think this is actually a very cool idea.

Merged from 'Switch control statement at the screen flow.' (idea created on 2012-01-20 16:34:18 by Hugo Almeida), on 2014-01-24 12:37:19 by Gonçalo Borrêga
Hans Baard2 Jul 2015
Any progress on this idea?
Would be great to have.
Jason Herrington25 Mar 2015
There may be some cases where I want to look at a value (say module type) and then depending on the value (say integer) I may want to display several different things.  Right now I think the only way to do that is via several if's.  It would be nice to have a switch statement where you put in a value to look at, and then have multiple output possibilities based on the value coming in along with a default output if the input doesn't match any of the cases.

Merged from 'Switch Statement' (idea created on 2015-03-25 21:47:05 by Jason Herrington), on 2017-07-11 08:34:32 by Carlos Alfaro
João Fernandes26 Mar 2015
Can you clarify if you're talking about the server-side logic or the UI?
Because you can do a switch on your logic. Check here the docs.


Merged from 'Switch Statement' (idea created on 2015-03-25 21:47:05 by Jason Herrington), on 2017-07-11 08:34:33 by Carlos Alfaro
Justin James26 Mar 2015
It would be nice if there was a matching Switch widget for the Screens/Blocks on the UI.

J.Ja


Merged from 'Switch Statement' (idea created on 2015-03-25 21:47:05 by Jason Herrington), on 2017-07-11 08:34:33 by Carlos Alfaro

Just as we have the IF statement we can use when building the frontends, it would be great to have a switch statement so we could, for example, show/hide several elements according to a boolean expression. The workaround is enclosed ifs, which makes the interface difficult to view and manage,



Merged from 'Have a switch "action" in the frontend editor' (idea created on 2017-06-26 10:32:31 by Paulo Sebastião), on 2017-07-11 08:35:01 by Carlos Alfaro

A switch would be functionally and visually just about no different from Ifs right after each other. Also, don't nest Ifs if you don't like it, just put them right after each other with a blank "false".

J.Ja



Merged from 'Have a switch "action" in the frontend editor' (idea created on 2017-06-26 10:32:31 by Paulo Sebastião), on 2017-07-11 08:35:01 by Carlos Alfaro

@Justin, true, but the situation gets tricky when you have about 10 Ifs with a lot of visual elements. This starts getting extremely difficult to manage (visually). With the switch, we would be able to show only one or all of the branches. This would make it easier to jump to a specific branch straight away.



Merged from 'Have a switch "action" in the frontend editor' (idea created on 2017-06-26 10:32:31 by Paulo Sebastião), on 2017-07-11 08:35:01 by Carlos Alfaro

Paulo -

Ah, yeah, that makes sense! I rarely use the "show true" or "show false" on the If so I forget that this is a feature. :)

J.Ja



Merged from 'Have a switch "action" in the frontend editor' (idea created on 2017-06-26 10:32:31 by Paulo Sebastião), on 2017-07-11 08:35:01 by Carlos Alfaro