I ran into a hard to find bug and struggled to understand why Alteryx was behaving in such an unexpected way. I have an Int64 integer Id with 19 digits ( but less than max Int64 - ie supported by Int64) . I want to use the ID as part of a string so decide to convert to a string but both ToString(Id) and ToString(Id,0) do not give me the result I expect. For example,

On the other hand, if I convert the Int64 to a string in a Select widget then the conversion works fine

I then noticed a couple of conversion errors - ConvError: Formula (4): Id: 1234567890123456789 does not fit in the type Double. So I guess the Int64 is converted to a double before being converted to a string. I understood that a double is in the range +/- 1.7 x 10-308 to 1.7 x 10308 . So I am confused as to why the Int64 doesn't fit in type Double as the conversion error indicates.
Can someone explain what is going on here? (update - having looked on StackOverflow I think I understand - 2^53 is the largest integer that a double can store without losing percision)
Personally, I don't think it is good practice to change variable types in Select widgets. And its also odd that changing to type String in the Select widget gives a different result to the ToString function. Would be nice to have consistent conversion behaviour in Alteryx.
Martin