web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Blogs / Nishant Rana’s Weblog / Schema validation found non...

Schema validation found non-data type errors in InfoPath

Nishant Rana Profile Picture Nishant Rana 11,325 Microsoft Employee
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.

Comments

*This post is locked for comments