Unable to download microsoft.activities.extension

It shows no compatible version with Windows project.
I need to use Dictionary activities, how can I use it. Is there any other Alternative.

Hi,

Can you check the following topic?

Regards,

Hi @Navneet_Jaiswal

we assume that your project is defining “Windows” as selected TargetFramework Microsoft.Activities.Extensions Package is only available for the Windows - Legacy targetframework.
However, we can work with dictionaries as well with the following alternates:

  1. For creating a dictionary
    Samples for a String, Int32 Dict Init: yourDict = new Dictionary(Of String, Int32) (assign Activity)
  2. Adding to the dictionary collection
    yourDict(“YourKey”) = 123 (assign Activity)
  3. Get value from dictionary with keypair
    myVar = yourDict(“YourKey”) (assign Activity)

Regards, I hope it helps!!

Thanks for your help. Can u please tell how can I Fetch DataTable from excel and use it with Dictionaries. please see my below Sequence

image





image

The error I am getting:
image
image

Hi,

Perhaps, you should write it as the following.

MyDict(row("TiTle").ToString) = row("Details").ToString

BTW, in this case, we can also achieve it using the following expression.(Without ForEachRow)

MyDict = DTRecords.AsEnumerable.ToDictionary(Function(r) r("Title").ToString(),Function(r) r("Details").ToString())

OR

MyDict = DTRecords.AsEnumerable.ToDictionary(Function(r) r("Title").ToString(),Function(r) CObj(r("Details").ToString()))

Hope this helps you.

Regards,

Hi @Navneet_Jaiswal

In assigning the values to the keys in assign activity. Give like this

MyDict(row(“Title”).ToString) = row(“Details”).ToString

I hope it helps you!!