Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
4 replies
Subscribers
7 subscribers
Views
1619 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
Does Appian (7.11 on-premise) have any easy way in an expression/SAIL to perform
ryanh
over 8 years ago
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
0
Josh
Certified Lead Developer
over 8 years ago
Not really an answer for your common loops question but for your issue this snippet should work and remove the funky logic: "year(now()) +/- enumerate(n)". There is a gotcha with this code: n=0 and n=1 produce the same output.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
Josh
Certified Lead Developer
over 8 years ago
Not really an answer for your common loops question but for your issue this snippet should work and remove the funky logic: "year(now()) +/- enumerate(n)". There is a gotcha with this code: n=0 and n=1 produce the same output.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data