4
 Followers
60
 Likes

new / improved action tools

Service Studio
On our radar

What I like to see:

switch
to be able to set the labels of the conditions instead of seeing 1,2,3,4 and otherwise

do/while/do or  for-loop
I really would like to see a simple do/while on a condition, instead of a cumbersome if statement. the "cycle" note is a nifty feature with it.
wether is should be a for-loop with just an integer or a do/while I don't mind.
except for esthetics perhaps, because I don't like "breaking" out of a for-loop


Created on 21 May 2010
Comments (26)

Yeah, I agree an Do/While or For Loop would be good.

I would love to see perhaps even a Do CASE Statement:

DO CASE
     CASE <lCondition1>
        <statements>...
     [CASE <lCondition2>]
        <statements>...
     [OTHERWISE]
        <statements>...
     END[CASE]


Case could be possible with a switch but a do-while would be a great one!
When are we going to get these?

I've been asking for them since version 3.1 (or even earlier...)

Sure, most of the time the for-each loop works but sometimes the solution just looks wierd and would be *a lot* simpler -- read: lower maintenance -- with a for loop.

Merged from 'For loops' (idea created on 2010-06-08 10:28:46 by Carlos Fonseca), on 2010-07-08 16:26:14 by Paulo Tavares
Isn't this simlar to this idea http://www.outsystems.com/wisdomofthecrowds/IdeaComment_List.aspx?IdeaId=173 ?


Merged from 'For loops' (idea created on 2010-06-08 10:28:46 by Carlos Fonseca), on 2010-07-08 16:26:14 by Paulo Tavares
Right now I need to transverse a record list _backword_ and a "for each, backword" action tool would come very handy.
Or a "for-loop".
Merged this idea with 'While loop in Actions' (created on 2015-02-13 16:01:13 by Justin James)
Because using an If statement is an easy way to create an infinite loop by mistake.

J.Ja


Merged from 'While loop in Actions' (idea created on 2015-02-13 16:01:13 by Justin James), on 2017-08-20 14:08:04 by Justin James
yes, very much needed.



Merged from 'While loop in Actions' (idea created on 2015-02-13 16:01:13 by Justin James), on 2017-08-20 14:08:04 by Justin James
On that note, it's been proposed very often in similar matters

http://www.outsystems.com/ideas/173/new-improved-action-tools
http://www.outsystems.com/ideas/965/for
http://www.outsystems.com/ideas/730/enhanced-for-each
http://www.outsystems.com/ideas/1141/exit-loop
http://www.outsystems.com/ideas/776/add-break-continue-on-cycles
http://www.outsystems.com/ideas/289/detect-possible-infinite-loops-in-action-flows-and-force-the-definition-of-max-it


Merged from 'While loop in Actions' (idea created on 2015-02-13 16:01:13 by Justin James), on 2017-08-20 14:08:04 by Justin James
Sadly I suspect I posted at least a few of those...

J.Ja


Merged from 'While loop in Actions' (idea created on 2015-02-13 16:01:13 by Justin James), on 2017-08-20 14:08:04 by Justin James
The first idea (http://www.outsystems.com/ideas/173/new-improved-action-tools) has been proposed in 2010... how come it only has 16 likes (me included)?... Perhaps most outsystems developers don't feel the need of these tool action elements...
Indeed more tool action elements would leave the platform more expressive to code but also less "simpler".

I believe just the existence of a tool action element for a FOR loop, with a initialization, condition, and increment, would be suficient to handle most situations.

Merged from 'While loop in Actions' (idea created on 2015-02-13 16:01:13 by Justin James), on 2017-08-20 14:08:04 by Justin James
True,

imho, if you only create webpages and use sql propely there is almost no need for special for-loops.
However, when you are creating more batch-processing, converts and other BackOffice processes, the need for while-loops will increase.
In other words, it's the need for the 20% :)



Merged from 'While loop in Actions' (idea created on 2015-02-13 16:01:13 by Justin James), on 2017-08-20 14:08:04 by Justin James

Agreed



Merged from 'While loop in Actions' (idea created on 2015-02-13 16:01:13 by Justin James), on 2017-08-20 14:08:04 by Justin James

Yes, while should be present in actions



Merged from 'While loop in Actions' (idea created on 2015-02-13 16:01:13 by Justin James), on 2017-08-20 14:08:04 by Justin James

I know using a For Each widget covers the majority of cases where a loop-like behaviour is needed, and I have already used some kind of counter based systems with an if widget when I need to have an action do a cycle for some reason, but it always seemed a bit of a stretch to create a local variable, increment it and have it jump out the cycle when the iteration condition is met. 

is it possible to implement a while-like widget?

Regards,

Ângelo



Merged from 'Implement a "while-like" widget' (idea created on 2017-11-08 14:49:35 by Ângelo Sousa), on 2017-11-09 16:10:10 by Justin James

Isn't what you just described the typical implementation of a for-loop in any of the mainstream programming languages (PHP, C#, Java, JavaScript, Swift, etc...)?

The standard implementation of a "while" in any programming language isn't more than:

  1. If (condition) {
  2.   < implement your logic here >
  3.   go to 1.
  4. }

The main difference is in OutSystems you can see the "go to" (the loop!) visually as a connector back to the If tool...



Merged from 'Implement a "while-like" widget' (idea created on 2017-11-08 14:49:35 by Ângelo Sousa), on 2017-11-09 16:10:10 by Justin James

Hi Jorge

Yes I know that's what is behind a "while", which is why I was wondering if it is possible for OutSystems to implement a widget that does that logic in the background just like a ForEach does.  I realize this is nitpicking, but since the structure is always relatively the same (create a counter variable, insert if counter < end value, do the logic), I don't think it would be that hard



Merged from 'Implement a "while-like" widget' (idea created on 2017-11-08 14:49:35 by Ângelo Sousa), on 2017-11-09 16:10:10 by Justin James

Hey Joost,

The first idea is work in progress and it will be released soon (I'm tracking its progress with this idea: https://www.outsystems.com/ideas/4944/).

Regarding having do/while/do or  for-loop in the language we don't have short-term plans for this.

Should I rename this idea to include just the second part so that we can track them separately?

Cheers,

Merged this idea with 'For Loop' (created on 27 May 2018 10:54:12 by Ahmed Gad)

need to add "For loop", not a "For each loop" that loop till reach a specific number like

for (int i = 0; i < 10; i++)


This comment was:
- originally posted on idea 'For Loop' (created on 27 May 2018 by Ahmed Gad)
- merged to idea 'new / improved action tools' on 26 Oct 2018 15:35:15 by Tiago Leão

Hi,


Could you please eloborate it a but more?

For example, why would it be an advantage?

And would, for example, https://www.outsystems.com/ideas/173/new+%2f+improved+action+tools, a while-widget not be better?





This comment was:
- originally posted on idea 'For Loop' (created on 27 May 2018 by Ahmed Gad)
- merged to idea 'new / improved action tools' on 26 Oct 2018 15:35:15 by Tiago Leão

Changed the category to Builtin & User functions




This comment was:
- originally posted on idea 'For Loop' (created on 27 May 2018 by Ahmed Gad)
- merged to idea 'new / improved action tools' on 26 Oct 2018 15:35:15 by Tiago Leão

A For Loop is needed to repeat implementation of a piece of code for a specific number, although while loop is ok too



This comment was:
- originally posted on idea 'For Loop' (created on 27 May 2018 by Ahmed Gad)
- merged to idea 'new / improved action tools' on 26 Oct 2018 15:35:15 by Tiago Leão
Merged this idea with 'Loop Break' (created on 13 Mar 2018 16:26:04 by Victor Henrique Salvi)

Hello!

I think it will be very helpful to have a break tool to end the "for each" iteration.

Currently I iterate the list using the list index, but the agregate's pagination feature is lost with this method.


Thank you :D



This comment was:
- originally posted on idea 'Loop Break' (created on 13 Mar 2018 by Victor Henrique Salvi)
- merged to idea 'new / improved action tools' on 26 Oct 2018 15:37:33 by Tiago Leão

Changed the category to Builtin & User functions




This comment was:
- originally posted on idea 'Loop Break' (created on 13 Mar 2018 by Victor Henrique Salvi)
- merged to idea 'new / improved action tools' on 26 Oct 2018 15:37:33 by Tiago Leão
views
1388
Followers
4