# 「コレクションに追加(addtocollection)」のアクティビティがない

**URL:** <https://forum.uipath.com/t/addtocollection/488057>\
**Category:** フォーラム\
**Created:** [November 8, 2022, 2:42am UTC](https://forum.uipath.com/t/addtocollection/488057 "2022-11-08T02:42:37Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![r.nakanishi](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/r.nakanishi/32/181051_2.png) [@r.nakanishi](https://forum.uipath.com/u/r.nakanishi)\
**Post date:** [November 8, 2022, 2:42am UTC](https://forum.uipath.com/t/addtocollection/488057/1 "2022-11-08T02:42:37Z")

</div>

10月前半にuipathの更新がきたため、その影響だと思うのですが、  
画像の通り、アクティビティ欄から「コレクションに追加」のアクティビティが検索しても出てこなくなりました。

 ![コレクションに追加がない](https://global.discourse-cdn.com/uipath/original/4X/b/6/9/b692b450b1c660993f05182719516c1228540162.png)

なので、更新以前作成済みのシナリオからの「コレクションに追加」アクティビティをコピーして、  
作成中のシナリオに貼り付けた所、下記画像のようにプロパティがでてきません。

 ![コレクションに追加のプロパティがない](https://global.discourse-cdn.com/uipath/original/4X/5/8/7/587b7f8d25ff30a8cd134843ced4d58708acfb6a.png)

プロパティの設定方法(アクティビティカード内の詳細オプション?)または、更新後のコレクションに追加アクティビティと同じ内容のアクティビティが別名称等で、  
あるのかわかる方いましたら教えて頂けると幸いです。

---

<div class="post-metadata">

**Author:** ![Yoichi](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/yoichi/32/523754_2.png) [@Yoichi](https://forum.uipath.com/u/Yoichi)\
**Post date:** [November 8, 2022, 2:51am UTC](https://forum.uipath.com/t/addtocollection/488057/2 "2022-11-08T02:51:01Z")

</div>

こんにちは

以下英語ですが参考になると思います。

> [@How to add items to a list?](https://forum.uipath.com/t/how-to-add-items-to-a-list/485603/2):
>
> Hi, In UiPath.System.Activities 22.10.3, we can use AppendItemToList activity, as the following. It’s easy to use like AddToCollection if target type is List\<T\>. If you need to handle Collection\<T\> , AppendItemToCollection will work. Please note that if we want to update the input list, it’s necessary to set it at Output-Result property, too, as the following. Regards,

上記画像ですが、UiPath.System.Activities package が22.4.4以下の場合、22.4.5または22.10.3にアップデートしてみてもらえますでしょうか？

---

<div class="post-metadata">

**Author:** ![r.nakanishi](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/r.nakanishi/32/181051_2.png) [@r.nakanishi](https://forum.uipath.com/u/r.nakanishi)\
**Post date:** [November 8, 2022, 2:56am UTC](https://forum.uipath.com/t/addtocollection/488057/3 "2022-11-08T02:56:38Z")

</div>

ご回答ありがとうございます。  
確認した所、 UiPath.System.Activities packageのverは最新の22.10.3でした…

なので、コレクションに項目を追加で実現できるということですかね?

以前、Yoichi様にも教えて頂いたのですが、  
メールに複数ファイルを添付する場合の方法としてコレクションを追加を使用したため、  
今のシナリオにも使用する必要があったため検索した所、今回の質問に至ったという感じです。

---

<div class="post-metadata">

**Author:** ![Yoichi](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/yoichi/32/523754_2.png) [@Yoichi](https://forum.uipath.com/u/Yoichi)\
**Post date:** [November 8, 2022, 3:05am UTC](https://forum.uipath.com/t/addtocollection/488057/4 "2022-11-08T03:05:32Z")

</div>

こんにちは

新しいアクティビティが追加されたので、22.10ではAddToCollectionは対応していないのかもしれません。

> なので、コレクションに項目を追加で実現できるということですかね?

AppendItemToCollectionで実現できます。ただし使い方がAddToCollectionと違うので  
ご注意ください（上記参照先参照ください）

もし対象がListならAppendToListItemでも追加可能です（AddToColletionに近い仕様です）

---

<div class="post-metadata">

**Author:** ![r.nakanishi](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/r.nakanishi/32/181051_2.png) [@r.nakanishi](https://forum.uipath.com/u/r.nakanishi)\
**Post date:** [November 8, 2022, 4:03am UTC](https://forum.uipath.com/t/addtocollection/488057/5 "2022-11-08T04:03:21Z")

</div>

ありがとうございます。  
AppendItemToCollectionとAppendToListItem試してみます。
