Issue with Dictionary field. It is disabled in UiPath

I have created following class in c# Library, which is imported in UiPath as NuGet package.
InputTable with collection is disabled as shown in the attached screenshot.
Kindly let me know, how to enable this field so that user can click the “…” and fill the collection.

public class TableFields : CodeActivity
{
[Category(“Input”)]
[Browsable(true)]
[RequiredArgument]
public Dictionary<string, Argument> InputTable { get; set; }

    public TableFields()
    {
        InputTable = new Dictionary<string, Argument>();
    }

    protected override void Execute(CodeActivityContext context)
    {
        throw new NotImplementedException();
    }
}

image

Did you find a solution for this? I am having the same issue right now

Hi @llavieri and @deepak1745,

Can you try like this …

image

    [Category("Input")]
    [Description("Dictionary")]
    [DisplayName("Dictionary")]
    [Browsable(true)]
    public InArgument<Dictionary<string, Argument>> DictionaryItem { get; set; } = new Dictionary<string, 
     Argument>();

Regards
Balamurugan.S

Hey thanks. But, how can I Initialize that dictionary? Can you give me an example?

I tried:

New Dictionary(Of String, Argument) From {{ "", System.Activities.Argument.Create(Of String, System.Activities.ArgumentDirection.In)}}

But it throws an error: Type System.Activities.ArgumentDirection.In is not defined

Hi,

Im facing the same issue, did you solve it? How?

Regards