Sharepoint Infopath Form 2013 Change Event not updating the value back in the form

Sebin Eapen George

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.

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);

        }
    }  

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.

Sebin Eapen George

I have solved this issue using Rules in infopath.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

SharePoint 2013 InfoPath Form Library won't see .XML file as InfoPath Form

Grab value from input field on SHAREPOINT INFOPATH browser enabled form

How to Download to XML files Previous Versions of Infopath form SharePoint

convert infopath form to html form

change event on form inputs

How to change back the original value in my form after modified

Angular custom form control not updating form value

State value not updating on form validation

Jquery calling the action on change event and then reflecting the value in a div form

Back Button with keeping form value

change form variable at onchange event

HTML Form Class not updating on ajax event trigger

MS-Access VBA: How to set field value back to old value if Form_Error event is triggered

How do I enable InfoPath services in SharePoint 2013?

Using javascript to set a field (SharePoint 2013 edit item form)

Add popup window (html page) in form of infopath

InfoPath form options does not contain Security and Trust

InfoPath 2010 Form ask for "Samart Card"

Updating state on props change in React Form

Change event to check change on any form element

redux-form textarea value not updating

Manually updating Form.Item value

Dropdown and value not updating in Formik + React Form

jQuery Script Not Updating Form Input Value

Form Input Value not updating from script

Angular ControlValueAccessor onChanges not updating form control value

Updating dataGridView value from another form

Angular reactive form value not updating on form array push

How to change HiddenInput value of form

TOP Ranking

HotTag

Archive