Hello all. I need to do a multiplication of 2 numbers (which are percentages) gathered from different locations.
For example, if the 1st number gathered is 57, and the 2nd is 49.
The robot should be able to calculate 57%*49%. So the Result should be 27.93%. I will then need the result as string type.
Currently, I get the numbers as string type, say Num1 & Num2. Then, I am not sure what I should assign Result to be to do the calculation.
It doesn’t work to assign Result = Convert.ToInt32(Num1)*Convert.ToInt32(Num2)/10000 and set Result as Decimal type. Then output Result.string.
You have a type issue. You can’t multiply 2 integers, then divide all in the same assign activity. If you change the Result variable to a double, then you can do it but not when it’s a decimal. The easiest solution would just be to change the result variable to double. If you want to keep it as decimal, then see the attached workflow: delete2 - Copy.xaml (5.8 KB)