I have this GenericValue variable which receives a currency value from an Excel sheet.
It then opens Chrome into a system and uses a Type activity to type the value of that variable into the field.
And I am getting this error… Type ValueVariable: Cannot add System.Double to System.String
The funny thing is that the workflow includes some 30 variables copied from the same Excel Sheet which are then pasted into 29 fields of the System at Chrome using the Type Activity. And all of them work alright. Except this one.
But that only happens if I add “+”[k(enter)]“” after the variable. But isn´t that command supposed to just simulated the pressing of the enter key?
Another problem, even more complex, is that I am copying some dates from Excel in the format DD/MM/YYYY.
But when pasting into a DD/MM/YYYY field on the browser, it seems UiPath is trying to type a MM/DD/YYYY format, which gives some pretty funky results.
Try not to use GenericValue variables if know their types (Double in your case), and to type, use varNumber.ToString+“[k(enter)]”, for the dates you will need to force formats.
I am under the impression that I ONLY did choose Generic Value (which I did not even knew about and its a pain in the ass to find) because I had problems with int32 and string variables to copy Excel stuff. And it was suggested to me here on this forum.
Dates are always painful when your region date format is not the same as you excel ones, you need to know how the date from excel is getting in uipath (as text or as object) and then you use a formatting function to make it work. Doubles are numeric types that can have decimals and take very large numbers.
if its a format issue .ToString(“dd/MM/yyyy”) you can get the format that your looking for, If you have “[k(enter)]” and simulate property checked then it will fail as it will consider everything as string as “[k(enter)]” is a hardware event.