Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Suggested Answer
+1
person also asked this
people also asked this
Replies
4 replies
Answers
1 answer
Subscribers
9 subscribers
Views
7545 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
Retrieve Multiple values form an Array for given array of indices
saileshd
over 8 years ago
I have an array and its selected indices in an integer array.I want to load the values of this array for the selected indices to a variable. Any suggestions? I think it will be apply function over index(). But not sure of its syntax.
OriginalPostID-257076
Discussion posts and replies are publicly visible
0
Rama Thummala
Certified Lead Developer
over 8 years ago
Hi Saileshd,
Please use below syntax...,Replace values with your list
index(
{"A";"B";"C";"D"},
{1;3}
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
+1
Dastagiri Dudekula
over 8 years ago
If any cdt type array requirement, following syntax can also helpful
index(
{
{id:1,name:"Abc"},
{id:2,name:"Pqr"},
{id:3,name:"Xyz"}
},
{1,3}
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Reject Answer
Cancel
0
Sidhant Behura
over 8 years ago
Index function alone will do the job for you. You don't need to use index in apply because index() takes index or array of indices.
Below is the format/syntax.
index( array, index, [default] )
Please refer the below link for detailed information.
forum.appian.com/.../Array_Functions.html
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
saileshd
over 8 years ago
Thanks everyone, it works :)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel