Switch True and False in IF
1535
Views
34
Comments
On our RadarOn our Radar
Service Studio
You always have to use the Swap Connectors because True has to go down and False to the side for the exceptions. 
2016-04-21 20-09-55
J.
mvp_badge
MVP
erm, why?

2020-09-15 13-07-23
Kilian Hekhuis
mvp_badge
MVP
No J, he's completely right! I'm always very annoyed that if you drop an If onto a connector it creates a False, while if you put an If onto the canvas, then draw the first connector it's a True! Totally incosistent!

As for why "down" should be True: programs are far more legible when the main flow is expressed in positive Ifs. So this:



Is far better than this:



2019-11-12 17-31-26
Justin James
mvp_badge
MVP
Agreed 100%! I virtually *always* need to "Swap" an IF after putting it in the workflow in the middle of an existing connector. That's a sign that the current behavior is wrong.

J.Ja
2016-04-21 20-09-55
J.
mvp_badge
MVP
Meh, Yes, the mainflow should go down. No, it should not be always the true path. I like to have ifs logical , not infested with not's.
2020-09-15 13-07-23
Kilian Hekhuis
mvp_badge
MVP
J, that's exactly the point. It seems though your logic isn't mine :)))
Merged this idea with 'When dropping an IF tool in a flow make the TRUE connector the default instead of False' (created on 13 Oct 2018 13:38:27 by Tiago Bernardo)

Hello everyone!

Because I use the pattern of developing the flow vertically for the happy/positive condition, like "IsValid" or "IsSuccess" or "Customer found", I would like the platform, when dropping an IF tool in a flow to make the TRUE connector the default instead of the False.

Also, when deleting just an IF tool from the flow the connector that should stay connected should be the TRUE and not the False.

This all is also consistent to the fact that when you have an isolated IF tool not in a flow and you want to make the first connector, that first connector is the TRUE.

You can see an example of all of this in this short video that I made: https://www.screencast.com/t/4Vl2vGyrqYT

Cheers,

Tiago Bernardo


PS: I had this Idea for a long time but it all came again to surface after seeing the AI demo at NextStep 2018 in Amsterdam where in the demo the person had for 2 times click the "swap connectors" in the 2 IF tools that were added to the flow!



This comment was:
- originally posted on idea 'When dropping an IF tool in a flow make the TRUE connector the default instead of False' (created on 13 Oct 2018 by Tiago Bernardo)
- merged to idea 'Switch True and False in IF' on 13 Oct 2018 22:36:45 by Vasco Pessanha
2020-09-15 13-07-23
Kilian Hekhuis
mvp_badge
MVP

As an additional remark, when dragging the first connector from an If, it's the True that's dragged, so the behaviour between drag (arrow) and drop (the Statement) is inconsistent as well.

Merged this idea with 'Vertical connector of an IF node should default to True' (created on 14 Mar 2019 09:26:47 by Nordin Ahdi)
2021-08-12 11-00-27
Nordin Ahdi
mvp_badge
MVP

In the light of the best practice to keep Action Flows vertical and tidy, I think it makes more sense to default the vertical connector of an IF node to True.

Example 1:

Example 2:


Currently, when you drag an IF node to your canvas where there is already an existing connection towards the End node, it defaults the vertical connector of the IF node to False (see Example 1). 

Even when there is already an IF node present in the flow where you swapped the connectors (see IF node "Certicate Valid?" in Example 2), the next IF you drag to the connected flow still vertically defaults to False.

I find myself, and I'm sure there are other developers, to have to swap the connectors of an IF a lot as it makes more sense to me that a logical vertical flow should have a green light (True) and if something is wrong and there's a red flag the flow should move sideways (False).

Let me know what you guys think.



This comment was:
- originally posted on idea 'Vertical connector of an IF node should default to True' (created on 14 Mar 2019 by Nordin Ahdi)
- merged to idea 'Switch True and False in IF' on 18 Mar 2019 09:35:26 by Vasco Pessanha

I totally agree with you, Nordin!

I like to make the vertical flow the happy path scenario, so I find myself swapping connectors 99% of the times I drag & drop an If node onto the canvas. The default branch should be the True one.


Cheers!



This comment was:
- originally posted on idea 'Vertical connector of an IF node should default to True' (created on 14 Mar 2019 by Nordin Ahdi)
- merged to idea 'Switch True and False in IF' on 18 Mar 2019 09:35:26 by Vasco Pessanha
2021-08-12 11-00-27
Nordin Ahdi
mvp_badge
MVP

Thanks for the support Ricardo :-). 

Let’s see what other community members have to say.



This comment was:
- originally posted on idea 'Vertical connector of an IF node should default to True' (created on 14 Mar 2019 by Nordin Ahdi)
- merged to idea 'Switch True and False in IF' on 18 Mar 2019 09:35:26 by Vasco Pessanha
2020-04-15 12-37-36
Daniel Kuhlmann
mvp_badge
MVP
Merged this idea with 'Add If Widget, automatically add true and false: true goes down' (created on 15 Jun 2021 12:18:47 by Joost Miltenburg)

Please bring this in line with best practices. 



This comment was:
- originally posted on idea 'Add If Widget, automatically add true and false: true goes down' (created on 15 Jun 2021 by Joost Miltenburg)
- merged to idea 'Switch True and False in IF' on 17 Jun 2021 04:52:08 by Daniël Kuhlmann
2020-04-15 12-37-36
Daniel Kuhlmann
mvp_badge
MVP
Merged this idea with 'Option to swap Default IF connectors' (created on 20 Dec 2016 00:50:11 by Carlos Lopez)

This would be a low priority, however I would find it very helpful. I find myself constantly swapping the if connetors, since I have been coding for a long time and I am very used to fromulating the IF conditions on the basis that I will be using the true branch first (and sometimes only the true branch). As such, I have to constantly swap the connectors which is abit of a hassle. I have searched the platform for an option to swap the defaults, however I havent found one, but please correct me if Im wrong.


Regards CLSJ 



This comment was:
- originally posted on idea 'Option to swap Default IF connectors' (created on 20 Dec 2016 by Carlos Lopez)
- merged to idea 'Switch True and False in IF' on 17 Jun 2021 05:05:35 by Daniël Kuhlmann

Hi Carlos,

Was this the option that you were asking for?



This comment was:
- originally posted on idea 'Option to swap Default IF connectors' (created on 20 Dec 2016 by Carlos Lopez)
- merged to idea 'Switch True and False in IF' on 17 Jun 2021 05:05:35 by Daniël Kuhlmann
Merged this idea with 'Allow developers to change the 'IF' default direction' (created on 08 Nov 2019 22:33:00 by Duarte Miguel Arrobe)

This comment was:
- originally posted on idea 'Option to swap Default IF connectors' (created on 20 Dec 2016 by Carlos Lopez)
- merged to idea 'Switch True and False in IF' on 17 Jun 2021 05:05:35 by Daniël Kuhlmann

Can you please add an option on the 'Service Studio' settings to allow developers to change the default direction of the 'IF' widget?

I know that the default behavior is to put the 'false' branch downwards, but there are a lot of developers that are more 'optimistic' and like to have the 'happy/true' flow downwards.

What do you guys think?



This comment was:
- originally posted on idea 'Allow developers to change the 'IF' default direction' (created on 08 Nov 2019 by Duarte Miguel Arrobe)
- merged to idea 'Option to swap Default IF connectors' on 12 Nov 2019 09:31:30 by Sofia Modesto


This comment was:
- originally posted on idea 'Option to swap Default IF connectors' (created on 20 Dec 2016 by Carlos Lopez)
- merged to idea 'Switch True and False in IF' on 17 Jun 2021 05:05:35 by Daniël Kuhlmann

I seem to remember this same Idea being discussed recently, although I can't seem to find the original in order to request a merge.


Can someone contact Joost?

He was advocating for this change on the original Idea.



This comment was:
- originally posted on idea 'Allow developers to change the 'IF' default direction' (created on 08 Nov 2019 by Duarte Miguel Arrobe)
- merged to idea 'Option to swap Default IF connectors' on 12 Nov 2019 09:31:30 by Sofia Modesto


This comment was:
- originally posted on idea 'Option to swap Default IF connectors' (created on 20 Dec 2016 by Carlos Lopez)
- merged to idea 'Switch True and False in IF' on 17 Jun 2021 05:05:35 by Daniël Kuhlmann
2020-04-15 12-37-36
Daniel Kuhlmann
mvp_badge
MVP
Merged this idea with 'Service Studio IF Direction' (created on 26 Feb 2021 16:23:49 by João Franco)

This comment was:
- originally posted on idea 'Option to swap Default IF connectors' (created on 20 Dec 2016 by Carlos Lopez)
- merged to idea 'Switch True and False in IF' on 17 Jun 2021 05:05:35 by Daniël Kuhlmann

This idea must already exist but I couldn't find it, so here it is.

It would be great if the platform flow IF would set the True direction to where the flow is continuing. 


Today after dropping an IF inside the flow, the down direction is being mapped as False.

If there isn't a community/OutSystems consensus, It would be awsome if I could configure this kind of things in Service Studio myself, because I'm always switching the connectors and can't even switch them in Bulk.



This comment was:
- originally posted on idea 'Service Studio IF Direction' (created on 26 Feb 2021 by João Franco)
- merged to idea 'Option to swap Default IF connectors' on 27 Feb 2021 13:20:12 by Daniël Kuhlmann


This comment was:
- originally posted on idea 'Option to swap Default IF connectors' (created on 20 Dec 2016 by Carlos Lopez)
- merged to idea 'Switch True and False in IF' on 17 Jun 2021 05:05:35 by Daniël Kuhlmann
2020-04-15 12-37-36
Daniel Kuhlmann
mvp_badge
MVP

Hi João, go idea, and indeed it already exists for a long time, so I will merge yours into that one.



This comment was:
- originally posted on idea 'Service Studio IF Direction' (created on 26 Feb 2021 by João Franco)
- merged to idea 'Option to swap Default IF connectors' on 27 Feb 2021 13:20:12 by Daniël Kuhlmann


This comment was:
- originally posted on idea 'Option to swap Default IF connectors' (created on 20 Dec 2016 by Carlos Lopez)
- merged to idea 'Switch True and False in IF' on 17 Jun 2021 05:05:35 by Daniël Kuhlmann
2020-04-15 12-37-36
Daniel Kuhlmann
mvp_badge
MVP

I am amazed that this idea is still not implemented, the happy flow is true downwards.

What is holding OutSystems back, to implement this?

99% of the IFs we need to swap, it just doesn't make sense.



This comment was:
- originally posted on idea 'Option to swap Default IF connectors' (created on 20 Dec 2016 by Carlos Lopez)
- merged to idea 'Switch True and False in IF' on 17 Jun 2021 05:05:35 by Daniël Kuhlmann

What is amazing is that in NextStep 2019 in Amsterdam there was a presentation from António Alegria about the new AI capabilities of the platform, that in the demo of just a simple flow to scan a barcode, the AI Assistent twice predicted that an IF was what the developer wanted, but twice it had to right click the IFs to change the directions of the flow!

I personally talked with António Alegria about this "glitch", they are aware, but apparently it is not a priority to get it fixed; it seems nothing is "broken".

Here is the link to the presentation where the example starts at minute 12:30.

How to Be More Productive With AI Development Assistance - NextStep 2019

--Tiago Bernardo



This comment was:
- originally posted on idea 'Option to swap Default IF connectors' (created on 20 Dec 2016 by Carlos Lopez)
- merged to idea 'Switch True and False in IF' on 17 Jun 2021 05:05:35 by Daniël Kuhlmann

Well, to de honest. We probably are all on wide screen monitors. So, if the best practices would say the happy should go from left to right:

1. There is no need to change

2. Better use of monitor space / less scrolling 

2020-09-15 13-07-23
Kilian Hekhuis
mvp_badge
MVP

I disagree, happy flows should go down (with the obvious exception of For Each loops). It's been recognized as best practice for ages. Besides, if your flow is much longer than what can fit compfortably on a single monitor screen, it's probably too long anyways :).

Well, that's a big assumption... More times than not I see people who develop with OutSystems, they own a laptop with 15'' but right now, all my team uses 13'' screen. Again, this is only based on my experience although if you observe the OutSystems Learn and Document material, the flow usually goes from top to bottom with little side nodes, and in other programming languages, it's used the same reading technique.

2020-09-15 13-07-23
Kilian Hekhuis
mvp_badge
MVP

I think it's criminal to have people develop in a visual language on a 13" screen. One should at least have a 27" full HD, and preferably a larger 4K monitor. 13" is nice if you're on the move, but not for full-time development.

> I disagree, happy flows should go down (with the obvious exception of For Each loops). It's been recognized as best practice for ages.

Well, Mendix does it from left to right…


> development on 13”? 
That is indeed criminal. You should only do that on the move or to drive a large monitor. 

For me, it's better that happy flows go from top to down because:

  1. Your mouse wheel scrolling direction is vertical and not horizontal, so it's way faster than dragging a horizontal scroll bar.
  2. The canvas' sides can be left empty to add comments, for instance, which is much more readable than horizontal comments.


Cheers!

True,


However if your screen is wide enough, there is hardly any need to scroll


??

2019-11-12 17-31-26
Justin James
mvp_badge
MVP

Never in a million years would I want the code going left to right. Once you account for all of the toolbars and everything else that Studio has, even on a widescreen it doesn't have that much horizontal space. As Ricardo says, scroll wheels go vertically. Scaffolding does stuff vertically too, not that it is the final determination of truth, but why rearrange everything the system does?


And really? Left to right vs. top to bottom doesn't matter too much if the action is small enough to fit on one screen. As soon as it does get bigger than the screen, top-down is simply easier for a bunch of arbitrary reasons that we can't change.


Finally, once you upgrade to a proper 4k monitor of any decent size, you quickly find out that a really great way to work is to snap Studio to one side of the screen and the browser to the other side, so you can test, have your user stories, etc. side by side with Studio, and once you do that, you Studio has a lot more vertical space and a lot less horizontal space.

Bottom line: OutSystems made the change for False to be down a long time ago, it was the wrong decision, we've been complaining about it for years (close to 10 years now), people who never knew the old, "right" way know the current way is wrong, and this is likely a 5 second change, and OutSystems still won't change it. Don't know why.


J.Ja

13'' is indeed a pain, but because every developer can be allocated to different projects or even different clients when needed, we all have laptops and our company only gives these small Lenovo. Usually people have a side screen of at least 24'' which is better, but I would be very comfortable reading code too much to the left because for me it kind of breaks the reading flow.

It would be great if it could be configured or adapted to the way the developer uses the service studio.