cancel
Showing results for 
Search instead for 
Did you mean: 

SPLIT COLLECTION ERROR

MarinaDutta
Level 5
Hi All,

I am getting error "System Exception : Template collection cannot be empty" Kindly me me to resolve

378.png379.png
380.png

------------------------------
Marina Dutta
------------------------------
1 BEST ANSWER

Helpful Answers

Hi Marina,

This error is a very common mistake that many people have done due to misunderstanding of the usage for this action. Here the problem is that you do not have any rows in your template collection. For this action to work try to ensure that you at least have one row in the collection where you do not need to have any initial values. 

The thing I always do while using this action is to check the "Single Row" property while opening the template collections so that way I do not need to worry about adding a blank row manually in the Initial Values tab. Try doing the same and let us know if it works 🙂

------------------------------
----------------------------------
Hope it helps you and if it resolves you query please mark it as the best answer so that others having the same problem can track the answer easily

Regards,
Devneet Mohanty
Intelligent Process Automation Consultant | Sr. Consultant - Automation Developer,
Wonderbotz India Pvt. Ltd.
Blue Prism Community MVP | Blue Prism 7x Certified Professional
Website: https://devneet.github.io/
Email: devneetmohanty07@gmail.com

----------------------------------
------------------------------
---------------------------------------------------------------------------------------------------------------------------------------
Hope this helps you out and if so, please mark the current thread as the 'Answer', so others can refer to the same for reference in future.
Regards,
Devneet Mohanty,
SS&C Blueprism Community MVP 2024,
Automation Architect,
Wonderbotz India Pvt. Ltd.

View answer in original post

4 REPLIES 4

Hi Marina,

This error is a very common mistake that many people have done due to misunderstanding of the usage for this action. Here the problem is that you do not have any rows in your template collection. For this action to work try to ensure that you at least have one row in the collection where you do not need to have any initial values. 

The thing I always do while using this action is to check the "Single Row" property while opening the template collections so that way I do not need to worry about adding a blank row manually in the Initial Values tab. Try doing the same and let us know if it works 🙂

------------------------------
----------------------------------
Hope it helps you and if it resolves you query please mark it as the best answer so that others having the same problem can track the answer easily

Regards,
Devneet Mohanty
Intelligent Process Automation Consultant | Sr. Consultant - Automation Developer,
Wonderbotz India Pvt. Ltd.
Blue Prism Community MVP | Blue Prism 7x Certified Professional
Website: https://devneet.github.io/
Email: devneetmohanty07@gmail.com

----------------------------------
------------------------------
---------------------------------------------------------------------------------------------------------------------------------------
Hope this helps you out and if so, please mark the current thread as the 'Answer', so others can refer to the same for reference in future.
Regards,
Devneet Mohanty,
SS&C Blueprism Community MVP 2024,
Automation Architect,
Wonderbotz India Pvt. Ltd.

ewilson
Staff
Staff
Hi @Marina Dutta,

Split Collection is definitely a poorly documented action. We'll have to get that fixed. What this action does is take an input collection of a certain number of columns and divides the data, across columns, based on the two input templates. As an example, lets say I have an input collection with 4 columns (Field1, Field2, Field3, and Field4) of data and I want to split it evenly into two collections with each containing 2 columns worth of the original data (Field1 and Field2 data in one collection and Field3 and Field4 data in the other collection). What I need to do is create a template collection that describes that division. There are a few things to be aware of though when defining your template collections:

  1. The column names and types must match the source collection.
  2. Each template collection must include a single empty row.

I've included a few screenshots that may help:

Source Data Collection
347.png
348.png
Collection 2 Template
349.png

Collection 3 Template

350.png
​Now, after I run the Split Collection action, Collection 2 (not the template) will contain the data from columns Field1 and Field2 or the source collection, and Collection 3 (not the template) will contain the data of columns Field3 and Field4 from the source collection.

Does that make sense?

Cheers,


------------------------------
Eric Wilson
Director, Integrations and Enablement
Blue Prism Digital Exchange
------------------------------

Thank You Eric Wilson. I could get the columns from the collections but I did not get any values for those columns which I splitted from collection. I just got column names without any value in their fields

------------------------------
Marina Dutta
------------------------------

@Marina Dutta,

Based on your screenshots it looks like you are using the same collections for the template input and output. Try setting completely separate collections​ as the output values. So you should have 5 different collection data items:
  1. Source Data Collection (input)
  2. Collection 2 Template (input)
  3. Collection 3 Template (input)
  4. New Collection 2 (output)
  5. New Collection 3 (output)
The template collections are not used to store actual data from the source. They are just used to show the Code stage what column definitions should be used in the actual output collections (the ones that DO capture data from the source collection).

Cheers,

------------------------------
Eric Wilson
Director, Integrations and Enablement
Blue Prism Digital Exchange
------------------------------