Populate a directory with key of type String and Value of type List of String

I am new to UiPath and I am trying to use lists within directories but there is not much information on how to manipulate them online.

New Dictionary(of String, List(of String))

What I am looking for is to have a validation in which when a key is added for the first time an element is added to its list and when the key already exists an element is entered into the same list. But I don’t know what activity or what properties to use to add elements in the first time you add a key, how do I add a key and an element to the list at the same time?

I would like to hear your recommendations, and as a note I can’t use packages external to UiPath.

Hi @WSay

Welcome to the UiPath Community.

Have a look at this xaml file:
Dict of String and List of String.xaml (11.2 KB)

thanks for the help, but unfortunately I can only use activities included in UiPath, without external packages.

All the activities used are included in UiPath.

Then there must be an error in the file, the activity does not appear after the assign, it tells me that the activity is missing, could you send screenshots of the workflow please?

Please check the updated file

Dict of String and List of String.xaml (11.2 KB)

Try this:

Also, there is a useful microsoft package which is almost always included alongside uipath ones.


1 Like

That really helped me, thank you very much!

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