Activity missing

Hi All i am using UiPath version -2023.10.0
i am trying to find an activity add to dictionary but it is not showing in activity pannel
a have tried through manage package but i don’t know which package is required.

image

Please let me know the package name

1 Like

Hi,

The following topic will help you.

Regards,

  1. Create a Dictionary Variable: First, create a variable of type Dictionary<TKey, TValue>, where TKey is the type of your keys (e.g., String) and TValue is the type of your values (e.g., String).

  2. Use the Assign Activity: To add a key-value pair to the dictionary, use the Assign activity. In the “To” field, specify the dictionary variable you created. In the “Value” field, assign a new key-value pair to the dictionary using the following syntax:

Please note that there might be custom packages or activities available on UiPath Go! or other sources that provide specialized dictionary manipulation activities, but these are not part of the standard UiPath activities package.

image
I assume you can find it in the above version

U can aslo try like this if in case u want to create a dictionary


new Dictionary(Of integer,String) from {{1,“car”},{2,“rose”}}

Hi

There was another thread with same discussion and it has got a workaround to solve this

Hope this helps
Cheers @office_work

i am reading an excel and want to store all the value of column A and column B into a dictionary
Please let me know the steps
here is my flow:

U can get those columns alone as a datatble like this in a assign activity

dt_new = dt.DefaultView.ToTable(False, “ColumnA”, “ColumnB”)

If the above comment is clarified would recommend to close this topic

Cheers @office_work

Sorry but It’s not clear till now

@office_work

if you need only two columns to be saved then use filter datatable activity…and give the columns you need

cheers

May I know the issue u r facing @office_work

HI,

Is your requirement that you need to create Dictionary from datatable? If so, the following will work.

Use ForEachRow activiy or use the following LINQ

dt.AsEnumerable.ToDictionary(Function(r) r("ColumnA").ToString,Function(r) r("ColumnB").ToString)

Sample
Sample20230926-5L.zip (8.9 KB)

Regards,