I'm currently working on a window calculation for a window that has a lot of attributes.
I've went through it line by line, letter by letter, over the last two weeks and believe I've fixed every single bug or misplaced character I can find.
However when I attempt to run it, the portal gives the error "Exception has been thrown by the target of an invocation"
When I pull up the logs I get a more detailed error message, but I'm not sure I know what it means.
Attribute Calculation Unsuccessful at 2016-08-10 11:44:26.984
Calculation successful for Attribute [_AssetLargeCalculations] on Class Type [IncidentManagement.Incident]
On Object : Key = [431b71be-1ab9-4226-bc08-4cb6506f3e26] Name = 
Calculated Value = 
Input string was not in a correct format.
I thought it was because I typed something in wrong, hence the detailed checking, but I even after fixing up the two instances where I liked , instead of ; it still doesn't appear to work.
Does anyone know of an easy way to find out what I've done wrong?
I've attached the script if anyone cares to have a look over it, but as you can see it's no small thing.