Custom Activity: Collection as Input Argument

I am creating a custom activity, and I want one of the input arguments - a dictionary - to appear in Studio the same way that the ItemInformation argument of Add queue item appears, that is, with a pop-up window that allows the developer to add a variable number of elements that goes into the input collection. How is this achieved?

Snap shot of desired functionality:

Code example that does not work:

1 Like

@TDagsvik did you found a solution for this issue? I also developed custom activity but I am struggling to define collection input parameters. Thanks a lot.

Unfortunately not. Please let me know if you find a solution!

Hi. Please have a look at:

These posts helped me to find the solution.

2 Likes

Hi, do you have a solution for this, because in my case I am able to see only disabled “Collection” and not able to open the Argument input box. See my post:

Same issue for me.
Did you figure this out?

Hi,
I discovered that we have to open the tool/dialog window and then we can add edit the records just in a grid format. Although, I didn’t implemented the solution if given the chance I can definitely do it.

Thanks,
Deepak

Cool, thanks Deepak!

If you do so, It would be great if you could share an example!

Best regards
Mikkel

Sure, I will share as soon as I do this

Is there an official or unofficial sample for this? I also I am not able to use either collection or dictionary arguments in the designer.

Any solution?

Hi All,

Is there any solution for this

In my view model

    public DesignInArgument<Dictionary<string, byte[]>> Attachments { get; set; } = null;

In my logic cs

    [Category("Input")]
    public InArgument<Dictionary<string, byte[]>> Attachments { get; set; } 

but you have to change something in code
from

to

 <uac:CustomEmail.Parameter>
    <InArgument x:TypeArguments="scg:Dictionary(x:String, x:String)">
      <CSharpValue x:TypeArguments="scg:Dictionary(x:String, x:String)" sap2010:WorkflowViewState.IdRef="CSharpValue`1_2"></CSharpValue>
    </InArgument>
  </uac:CustomEmail.Parameter>

otherwise the collection view won’t show , when you start adding one item to the collection, the collection view remain unchanged, even you update your custom activity

this is problem caused by UiPath not supporting the dictionary collection directly

dont know if this is helping