Does Appian (7.11 on-premise) have any easy way in an expression/SAIL to perform

Does Appian (7.11 on-premise) have any easy way in an expression/SAIL to perform the common looping type logic most languages have? Specifically I would like to be able to perform for-next/while/do-until type loops on some other functions and data.
Examples in other languages:
VB: For indexB = 20 To 1 Step -3
C/java: for (i = 0; i < 10; i++)
Fortran: DO I = I_START, I_END, I_INC
A(I) = x+y, etc.
END DO
Basic: FOR cntr = 1 TO 100
total = total + 10
NEXT cntr

I looked through the forums a bit as well as the plugins/expression library and the documentation and I can't find any way to do looping of this type other than via a process model or the somewhat constraining apply(), all(), etc. type functions.

Today I had a need to create a list/array of integers representing years (2012,2013,2014,2015,2016,2017). In most languages I would concatenate values for (myyear = 2012; myyear <= 2017;...

OriginalPostID-188844

OriginalPostID-188844

  Discussion posts and replies are publicly visible

Parents
  • ... myyear++) {concatenate(myyear)}
    or some such type of logic to make a list. Instead I had to use some funky logic using the apply(fn!sum,2012,enumerate(6)) type of logic and it was tedious to try and come up with the logic, here is part of it:
    List of years using the number of years before/after current year:

    apply(fn!cast(typeof(123),_),{union(reverse(apply(fn!sum(year(local(now())),_),-1*enumerate(ri!YearsBeforeCurrent+1))),
    apply(fn!sum(year(local(now())),_),enumerate(ri!YearsAfterCurrent+1)))})

    returned value: 2014; 2015; 2016; 2017

    I am happy to supply a better example/screen shots if needed.
Reply
  • ... myyear++) {concatenate(myyear)}
    or some such type of logic to make a list. Instead I had to use some funky logic using the apply(fn!sum,2012,enumerate(6)) type of logic and it was tedious to try and come up with the logic, here is part of it:
    List of years using the number of years before/after current year:

    apply(fn!cast(typeof(123),_),{union(reverse(apply(fn!sum(year(local(now())),_),-1*enumerate(ri!YearsBeforeCurrent+1))),
    apply(fn!sum(year(local(now())),_),enumerate(ri!YearsAfterCurrent+1)))})

    returned value: 2014; 2015; 2016; 2017

    I am happy to supply a better example/screen shots if needed.
Children
No Data