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
7 replies
Subscribers
7 subscribers
Views
3208 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
How to loop through an list(CDT) and print its indexes in a grid?...
padmanabhanv
over 11 years ago
How to loop through an list(CDT) and print its indexes in a grid?...
OriginalPostID-93501
OriginalPostID-93501
Discussion posts and replies are publicly visible
0
Eduardo Fuentes
Appian Employee
over 11 years ago
Not sure what you mean by printing its indexes but for looping on any list the Looping Functions are the best way to go. Please take some time to review this section of the documentation along with the examples to determine how these functions can help you meet your requirement
forum.appian.com/.../Looping_Functions
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
padmanabhanv
over 11 years ago
I am trying to display the index of the list in one of my columns in the grid. Which function can i make use there?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Eduardo Fuentes
Appian Employee
over 11 years ago
There are several examples in the documentation. Take a look at each of them to see which will help you with your requirement, there's no better way to come up with an idea than reviewing the documentation and testing.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Eduardo Fuentes
Appian Employee
over 11 years ago
There are other easier options when it comes to find indexes in lists such as where() and wherecontains()
forum.appian.com/.../Array_Functions
forum.appian.com/.../Array_Functions
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Sathya Srinivasan
Appian Employee
over 11 years ago
can you not simply use enumerate(cdt.length)? this will give you a sequence number. If you want an index that starts with 1, you can try adding 1 using apply(sum, enumerate(cdt.length),1) - However, make sure your CDT has a column to store this info.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Tim
Certified Lead Developer
over 11 years ago
1+enumerate(cdt.length) is perhaps a cheaper way of doing this
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
padmanabhanv
over 11 years ago
thanks guys
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel