cancel
Showing results for 
Search instead for 
Did you mean: 

Collection by index in Calc stage

PvD_SE
Level 12

Hi,

I'd like to access a row in a collection by the index for that row. As I'm not about to embark on writing C# code and create Code stages to do this, I'd like to know the syntax to use when working with index based collection data in a Calc stage.

The reason for my question is that I'm handling a set of linked collections outside of a Loop stage in order to speed up the process.

Some googled results claim it cannot be done, whilst most point to the Collection VBO actions or create Code stages - as do the answers found on this forum. I am indeed aware that there are Collection VBO actions that allow you to work index based with a collection that but they do not fit my solution.





------------------------------
Happy coding!
Paul
Sweden
------------------------------
Happy coding!
Paul, Sweden
(By all means, do not mark this as the best answer!)
2 REPLIES 2

John__Carter
Staff
Staff
Hi Paul - it can't be done via a calc I'm afraid, and you'll need to use the utility VBO or create some bespoke code. You've probably see that in a code stage a BP collection is represented as a .Net datatable, so you can use the functionality in the system.data namespace.

If your data originates from files or tables then it might be worth investigating OLEDB. For example, it's possible to write SQL to join data from different Excel sheets, much like you would if you were querying a database.

------------------------------
John Carter
Professional Services
Blue Prism
------------------------------

Thanks John,

'Can't be done' is a clear answer to my question indeed. 🙂

------------------------------
Happy coding!
Paul
Sweden
------------------------------
Happy coding!
Paul, Sweden
(By all means, do not mark this as the best answer!)