cancel
Showing results for 
Search instead for 
Did you mean: 

Reading Collection by index

NawinAnkathi
Level 3
Hello team, How can I read a specific value from a collection without using Loops? For example I have a products collection in which it has 100 records, I want to fetch 40th Row Product name (Products[40]), based on the index or the Field name. Please advise asap. Thanks, Naveen
11 REPLIES 11

SrinivasaRaoPat
Level 2
Hi Juke.. Try with Row Index = 0. Because Row Index will starts with ""0"". I hope it will help you.

Anonymous
Not applicable
Thank you for your comments. I think I found at least a workaround to make it work. And this applies also to writing (Set Collection Field) as well. Expanding my example below, let me specify more fields (ie. columns) like fTest, fTest1, fTest2, fTest3. Now, if I try to read a value from let's say (column) fTest2, row index 1, I get the error message as above, stating that a field named as the value in the first row (=index 0) in fTest2 does not exist. Then the workaround: In Initial values I add a row and type the field names as values like this: (field name) fTest - fTest1 - fTest2 - fTest3 (1st row values) fTest - fTest1 - fTest2 - fTest3 And it works! Just as the error message said. Now the method can find the correct ""field name"". I tried to look at the actual code inside the method, but could not figure out why it's looking for the field name from the first (index=0) row, instead of the real field name above the data rows.