At page 10 from solution document of UiDemo practice is suggested to set in the 1st Decision Flow the condition:
Double.TryParse(CashIn, dbl_CashIn) AND Double.TryParse(OnUsCheck, dbl_OnUsCheck) AND Double.TryParse(NotOnUsCheck,dbl_NotOnUsCheck)
I adapted the script to:
Double.TryParse(CashIn, 0) And Double.TryParse(OnUsCheck, 0) And Double.TryParse(NotOnUsCheck, 0)
… and like this it works, but I am not sure if it is the right solution.
2 Where should I use these 3 dbl_ variables? In the 3 type into activities?
Would be correct as well to use in the condition
Double.TryParse(CashIn, 0) And Double.TryParse(OnUsCheck, 0) And Double.TryParse(NotOnUsCheck, 0)
… and then to use 3 Assign activities Double.Parse:
dbl_CashIn => Double.Parse(CashIn)
This looks correct. However, if any of these variables are being assigned to the TryParse function, it should be a boolean type instead.
The double variables are used for comparing numeric data, as in to compare if one value is less than or greater than another. It is possible to use these for Type Into activities, but they would need to be converted to strings when you do so.
The conditions should be more like Double.TryParse(CashIn, dbl_CashIn), since the TryParse method simultaneously assigns the double value to the second parameter if it is successful. You won’t need to use assign activities, since TryParse automatically assigns the values.