Variable/Argument Type Inference

Hi Team,

I would like to suggest a new feature to UiPath Studio.

When we declare a variable using Ctrl+K shortcut the default behavior is create this variable as System.String. Previous versions of UiPath used UiPath.Core.GenericValue. Same for arguments (Ctrl+M).

We often just drag’n’drop a few assign activity, declare the variables using the shortcuts, and then start the journey to set all the correct types.

We need go to the Variables panel, start change the types one by one and if the type is not in the DropDownList (very common) we need go to Browser for Types…


…then search for the type we want to finally select it.


This process is even boring when we have .NET Generic Types and the argument type is not present in the DropDownList, is a journey inside a journey :sweat:


Maybe is not big deal with a few variables in a small project, but for medium/large projects we have a bunch of variables and doing these steps all the time is pretty boring.

My suggestion is add a button “Resolve By Inference” (or something like that) on Variables/Arguments panel. This button should only appear if there is any variable with wrong type in the workflow.

Once we click in this button, the Variable Types are resolved by inference using the value assigned to the respective variables/arguments.

Another option in add to this, is auto infer the type if the Value of the Assign activity was already set.

1 - Value set to 0 (zero):

2 - Ctrl+K to create a variable:

3 - Why System.String? It could be an System.Int32 since the value was already set:

It would be a great feature. :slightly_smiling_face:

Thanks for the detailed feedback. Sent this to our backlog.