title: Sharepoint Infopath Form 2013 Change Event not updating the value back in the form
body: <p>I have an infopath form .On the change event of To Field i am updating the value of another field called Shift. For that i have written following code.</p>
  
  <pre><code>public void To_Changed(object sender, XmlEventArgs e)
      {
          // Write your code here to change the main data source.
          ///my:myFields/my:RequestDetails/my:IndividualRequest/my:To
          // Write your code here.
          // Write your code here to change the main data source.
          ///my:myFields/my:RequestDetails/my:IndividualRequest/my:To
          try
          {
              XPathNavigator xmlDoc = this.MainDataSource.CreateNavigator();
              XPathNavigator xTo = xmlDoc.SelectSingleNode("my:myFields/my:RequestDetails/my:IndividualRequest/my:To", this.NamespaceManager);
              XPathNavigator xShift = xmlDoc.SelectSingleNode("/my:myFields/my:RequestDetails/my:IndividualRequest/my:Shifts", this.NamespaceManager);
  
  
  
              xShift.SetValue("6");
  
          }
          catch (Exception ex)
          {
              Log.WriteLog(ex);
  
          }
      }  
  </code></pre>
  
  <p>I have published the form and uploaded the form as contenttype. however when i change the To value in the infpath form, Shift Field value not updating.</p>