I work with workflows in Sharepoint 2007. In Workflow, I go to the Inforpath Code Behind form and add some duplicate values ββto the Sharepoint list.
string strProfitMargin = ProfitMargin; decimal margin1 = decimal.Parse(strProfitMargin); listItem["Test9"] = Math.Round(margin1, 2).ToString();
Suppose for ProfitMargin I get the value "0.4230769230769231" .
Decimal.Parse Returns method 4230769230769231 without a decimal point. Ultimately, Math.Round also does not work. This works great on my machine. But it does not work on QA servers. Please help me and explain why the decimal.Parse method does not work? The same path for double.Parse () returns a value without a decimal.
Thanks in advance!
SPKan source share