cancel
Showing results for 
Search instead for 
Did you mean: 

getting Particular row from a collection

KumariYadav1
Level 5
Hi All,
Plz help me out with the following query.
I have  two collections ,from one collection i need to fetch first row and from second collection i need to fetch last row. How can I achieve this. Please reply me asap.
thanks in advance

------------------------------
Kumari Yadav
------------------------------
6 REPLIES 6

BenLyons
Staff
Staff
Hi Kumari,

One way would be to use a loop on the first collection and you'll have row straight away. You could then use the collection manipulation utility to reverse the second collection, then use loop again to get the top row.

Another might be to use the collection manipulation to get 1 field at a time for row 0 (the first row), then do a row count for the second collection and get the fields for rowcount-1.

Thanks

------------------------------
Ben Lyons
Product Consultant
Blue Prism
UK
------------------------------
Ben Lyons Senior Product Specialist - Decipher SS&C Blue Prism UK based

Thanku for your response Ben . But for your second Logic can you let me know for which object and action you are referring, that which action is used for getting row from a collection by using row number. Is there any? Can you send me the ss for particular action what you are referring? It will be a great help.

------------------------------
Kumari Yadav
------------------------------

Hi Kumari,

This is the "Utility - Collection Manipulation" and the action "Read Collection Field". This action will only copy one field at a time.

Looking into it, a more suitable action would be the "Copy Rows" action. Here you can set the start row and number of rows to copy. This is probably the quickest way.

Thanks

------------------------------
Ben Lyons
Product Consultant
Blue Prism
UK
------------------------------
Ben Lyons Senior Product Specialist - Decipher SS&C Blue Prism UK based

Thanks for response Ben. will try this and let you know.

------------------------------
Kumari Yadav
------------------------------

Hi Ben, i have posted one more question, Can you please check that ? I need it really soon. Any Help would be appreciated. Thanks

------------------------------
Kumari Yadav
------------------------------

EVIPUTI
MVP
Utility - Collection Manipulation => Read Collection Field where you can provide input parameters as Collection, Field Name and Row Index. Try with Row Index = 0. Because Row Index will starts with ""0"" and for the last row count rows will give you the count which can be again passed as a index.

------------------------------
------------------------------
Vipul Tiwari
Senior Process Simplification and Optimization Designer(Solutions Architect)
Fidelity International
------------------------------
------------------------------
------------------------------ Vipul Tiwari Senior Process Simplification Developer Amazon ------------------------------