cancel
Showing results for 
Search instead for 
Did you mean: 

Error when appending fields to a Collection

PeterLomi
Level 3
I am trying to append fields to a collection which already contains 3 fields.  I've added Append Field (Text) stages for each field I want to add.  However, upon executing the first such stage, I get the following error: "Internal : Collection fields are defined but cannot be matched to the incoming collection - The collection definition does not contain the field XXXXXX."  What is happening here, and how can I resolve the error? 
3 REPLIES 3

Mustafa_UlasYig
Level 6
Hi Peter_A._Lomi Just want to ensure that you have the right input and output to the Append Field (Text) Action and that you have brackets and quotation marks set right. This is an example: Input: Collection = [3 Field Collection] Field Name = ""New Field Name in 3 Field Collection"" Value = (optional) Output = 3 Field Collection You could potentially get this error, if you are trying to output to a new collection or haven't set brackets and quotation marks right, not entirely sure. Hope it helps. BR, Mustafa

Hello sir Please Send Me steps

------------------------------
Nitesh Bodade
------------------------------

Hi Nitesh,

Let me try to explain you when you get this error exactly. Suppose you have a collection called as 'Input Collection' with one field named as 'Field1' as shown below:

17950.png

Scenario I:

Now, if you use the 'Append Field (Text)' action with this collection and try to append a field name with some field apart from what is available in it which is 'Field1' in our case like shown below:

17951.png

Here, I am trying to append a field called as 'Field2' which is not available in the 'Input Collection'. If I try to execute the workflow now, I will get the same error:

17952.png

The question is why does this happen? This happens since we are using a defined collection with a defined schema.

Scenario II:

If I used the same logic with an undefined collection, I would just have the column added but not the value as shown below:

17953.png
17954.png

Here why we are not seeing the value is because, this action does not adds any row and since we have an empty collection by default, we won't have any value updated in it.

Scenario III:

If you had a row added to this collection beforehand then append text action would have appended the data value to it as well.

So here if I had a collection with a field name and also a row included as shown below:

17955.png
Then, I can use the append text action to add a value to that field properly:

17956.png

So, to conclude remember the following points while using this action:

1) If you are using a defined collection, your field name that you are going to append should always match to one of the field names that is present in it's fields definition or schema otherwise you will get the exception as mentioned in this thread.

2) If you are using an undefined collection, you can use this action as a technique to add new columns or fields of text type (it's a hack we use a lot!)

3) If you want the data to be appended to the given field, ensure that you always have a row in your collection along with the appropriate field available beforehand when you want to use this action.


------------------------------
----------------------------------
Hope it helps you out and if my solution resolves your query, then please mark it as the 'Best Answer' so that the others members in the community having similar problem statement can track the answer easily in future

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 it helps you out and if my solution resolves your query, then please provide a big thumbs up so that the others members in the community having similar problem statement can track the answer easily in future.

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

----------------------------------