How to progressively add elements to a list of strings within a dictionary

I am currently working with a dictionary where the key is of type string and the value is a list of strings. Inside the keys, user IDs are stored and all URLs of all files with those IDs will be stored as values.

My question here is knowing how to add values ​​to this directory appropriately. So that when the ID is found for the first time, create the key and add the URL to the list, but when the key is already created, just add the URL to the list.

My question is more oriented to which activities to use and their properties structure, currently I already have the variable that will be stored in each one (key and value).

Please note that I cannot use packets other than what UiPath already includes.

I leave a reference photo on the structure where these activities would go to add values.


find a simplified prototype for learning purpose:


it was simplifying, as it concats all equal Letters into a list

Now it can be adopted on the different specifics of your case.

May you can share some more details on

  • URL or FilePath?
  • was the FileName used or is only a part of the filename the key?

Sorry for the delay in the response, but your example helped me to apply it to my problem, and it worked! Thank you so much.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.