I am using the Append to Collection activity, and I get this error compiling error:
This is my collection variable that I am trying to append to:
This is the Item I am trying to append to the collection:
And this is the activity
It seems like the output result allows only List variable. Do I need to convert from ICollection to List? Or what should I do?
ppr
(Peter Preuss)
November 29, 2022, 3:10pm
3
Thanks for the details:
A similar setup:
[grafik]
we do have following activities:
[grafik]
Append item to List:
[grafik]
[grafik]
we do have the typeArgument
Append item to Collection:
[grafik]
here the typeArgument is derived from the settings. We do adapt by:
regulating the datataype of given collection
the items are of the derived datatype
the returned result will be a List of the datatype which was derived
We recommend not to use CTRL+K within the differen fields. Instead use …
Ensure that AttachmentList is of datatype: List(Of String)
1 Like
RajKumar_DC
(RajKumar Durai)
November 29, 2022, 3:11pm
4
Hi @tarau_bianca ,
Hope this post will help you
try with system.collections.generic.List<system.string>
Variable
Yes I know this is simple but I hope some people find it useful.
I am posting this answer as this question keeps coming up since the new update (2022.10.3).
Questions
Not “Add To Collection” in Activity Panel
What to use instead “Add To Collection” Activity in Newupdate(2022.10.3)
The answer to both these questions is the same
Add To Collection Old (2022.4.6)
[image]
[image]
Variable type is “system.collections.generic.List<system.string>”
Append item to collection New (2022.10.3)
We …
Thanks,
Rajkumar
Well then it won’t be the same thing as using the “Append to List” activity? What is the difference between this two then, if both use lists?
1 Like
ppr
(Peter Preuss)
November 29, 2022, 3:53pm
6
when provided which is dependend to the selectedTargetFramework as activity:
Append Item toList - adds 1 item to the List and is directly adding it to the same list object
Append Item to Collection - can add 1 or more items to a list, but will return a new fresh list on which the origin and the items to add are concatenated
As also mentioned in the link (when a not direct addition is needed, and only one item is to add)
Assign Activity:
myList = myList.Append(“MyOtherStringItem”).toList
This HowTo gives an introductory overview of the conjunction operators: Concat, Append, Prepend
Introduction
The conjunction operators are used to add the item(s) to a particular set of items.
Concat, Append, Prepend Operator
The Concat Operator combines a set of items with another set of items
The Append Operator adds an item to a set of items on the end
The Prepend Operator adds an item to a set of items on the begin
Overview
I – Input
P – Processing
O – Output
{"A","B"} / {"…
or for multiple items
myCollection1.Concat(myCollection2).toList
1 Like
system
(system)
Closed
December 2, 2022, 3:54pm
7
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.