Hi all,
I have created a form for SharePoint in infopath and I setup a certain numbers of fields to Decimal as this will contain numbers with decimal point.
Now when I load data from database number bigger that 1000 are represented like this 1,230.80 and Infopath is displaying this red dotted and saying only numbers are allowed.
Now maybe I am stupid but the one above is a number what is the reason to display such a message? I checked the representation in the properties to allow commas separator and not allowed commas separator no difference
I have another field that sum a certain numbers of the present Fields but the issue above is screwing the all sum and the result is appearing like NaN.
I am using C# with the form I cannot understand if the issue lie with the form or the code.
I make assignments in this way:
XPathNavigator CurrentDebts = this.MainDataSource.CreateNavigator().SelectSingleNode("/my:myFields/my:CurrentDebts", this.NamespaceManager);
and then I use this field while retrieving data from database:
CurrentDebts.SetValue(string.Format("{0:n}", Convert.ToDecimal(reader["CurrentDebt"])));
Any help would be really appreciated.
Thanks
Federico