Search code examples
infopath

How to insert the field value in infopath form?


I have an infopath form ,i am able to retrieve the value from the field using:

MainDataSource.CreateNavigator().SelectSingleNode("/my:myFields/my:field1", NamespaceManager).Value;

But my question is, how can we insert new value in to that field?


Solution

  • Please go through all the properties,You can find

    MainDataSource.CreateNavigator().SelectSingleNode(
        "/my:myFields/my:field1",NamespaceManager).SetValue("Required value");
    

    I hope it helps