Schema validation found non-data type errors in InfoPath
Views (312)
We could get the above error while trying to set value for a field using XPathNavigator. The reason could be that the field has the nil attribute set
Most of the fields with the exception of String Type uses nil to indicate “no value”.
So before we could set the value for those fields, we need to remove the nil attribute from it.
We could use the below code for that.
XPathNavigator node= MainDataSource.CreateNavigator()
.SelectSingleNode(“/my:myFields/my:lblSpecHours”, NamespaceManager);
if (node.MoveToAttribute(“nil”,
node.DeleteSelf();
node.SetValue(txtValue);
Bye..
Posted in InfoPath Tagged: InfoPath
This was originally posted here.

Like
Report
*This post is locked for comments