I have 2 GenericValue variables with int and str values, If the first element in the expression is GenericValue variable it is filled as
integer, UiPath Studio will do the sum of the elements.
If the first element in the expression is the GenericValue variable to be populated as a string, UiPath Studio will perform the compounding of the elements.
The question is, for example when I filled the value of GenericValue string character “a” and GenericValue integer digit (12) and I want assign the result expression integer (12) + string “a”… Why I gettin some error? can you guys answer the spesific?
UiPath Studio has an automatic conversion mechanism of GenericValue variables, Taking this into consideration,
If your first expression is String – It will concatenate.
If your first expression is Int – it will sum up.
In your case the first expression is Int so it wouldn’t be able to sum, Instead it throws – Assign: Cannot add System.Int32 to System.String
Initialize Int variable as, Int – GenericValue – “12”
Reverse the expression like Assign = str + Int → It will work
Also refer this for clear understanding of GenericVariables — GenericValue Variables
Thanks for the insight
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.