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
7683 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
Array Functions
kalpanap
over 7 years ago
Hi All,
I have a requirement where there is a count eg. 12 containing {1,2,3,4,5,6,7,8,9,10,11,12} , from which i need to take out 3 lists like listA: {1,4,7,10}, listB: {2,5,8,11} and listC: {3,6,9,12} with uniform interval of 4. How can I achieve this in looping . You suggestion is appreciated.. Thanks
OriginalPostID-254666
Discussion posts and replies are publicly visible
Parents
0
chetany
A Score Level 1
over 7 years ago
Here's one solution:
with(
local!arrayLength: length(ri!array),
local!listA: wherecontains(todecimal(0), mod(3+enumerate(local!arrayLength), ri!interval )) ,
local!listB: wherecontains(todecimal(0), mod(2+enumerate(local!arrayLength), ri!interval)) ,
local!listC: wherecontains(todecimal(0), mod(1+enumerate(local!arrayLength), ri!interval )),
{
local!listA,
local!listB,
local!listC
}
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
chetany
A Score Level 1
over 7 years ago
Here's one solution:
with(
local!arrayLength: length(ri!array),
local!listA: wherecontains(todecimal(0), mod(3+enumerate(local!arrayLength), ri!interval )) ,
local!listB: wherecontains(todecimal(0), mod(2+enumerate(local!arrayLength), ri!interval)) ,
local!listC: wherecontains(todecimal(0), mod(1+enumerate(local!arrayLength), ri!interval )),
{
local!listA,
local!listB,
local!listC
}
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data