Ctrl+K or Ctrl+M are nifty shortcuts when we have to create a new variable or a new argument in a studio project. But they always default to a string datatype in the variable or argument section/panel. The developer then has to remember or check the error signs in the activity, navigate to variables or arguments panel and set the correct datatype.
A feature which allowed the user to choose the datatype when using Ctrl+K or Ctrl+M would refine / promote the use of these shortcuts.
If this feature is already available, I would definitely want to learn how to use it.
There are many activities in Uipath which creates the output variable to respective/required datatypes.
for example : Deserialize JSON Activity, Matches Activity etc
When you create a variable in “Expression Editor”, its automatically creates a variable of that type.
Refer the screenshts,
When you create a variable/Argument only in “Assign Activity” → Its default to String.
@jeevith
“Assign Activity” is used to assign different types(data types) of expression so how would it know, which data type it is? That’s why UiPath made it defaults to String.
When you want to create a variable lets say a int variable using assign activity.
You can use Ctrl+K to create the variable (you already know that the variable you want is int type) but UiPath defaults it to string. But thats not what you wanted in the first place.
UiPath can easily implement a keyboard event listener when user uses Ctrl+K in given input locations/activities and allow the user to choose the datatype (in this case int) right there in the studio GUI instead of forcing to navigate to the variables panel and doing the same from there.
This same solution can be implemented to arguments Ctrl+M.
A complete twin request! Good details in your post. Exactly what I was requesting as well. That has been an new sense to me since I started with UiPath why should one declare things later.
The answer for merging topics happens on a case-by-case basis (it kind of depends; we can only add the post from one topic under all existing posts of the other topic).
In this particular situation, I will simply close this topic and provide a link at the bottom to the earlier one.