after submit fields not updating - InfoPath Dev
in

InfoPath Dev

after submit fields not updating

Last post 03-25-2011 06:48 AM by BMARU. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 05-05-2010 01:09 PM

    • ehaze
    • Top 500 Contributor
    • Joined on 12-11-2007
    • Posts 49

    after submit fields not updating

    i'm using code to populate a text field with the name of the library the form is created from.

    this works.

    but, once i submit the form to another form libary and open it, the text field doesnt update to the new library name.

    any ideas? 

  • 05-05-2010 01:57 PM In reply to

    Re: after submit fields not updating

    Are you checking if the field has a value before updating it? Maybe already having a value is bypassing the setting of the new value. Maybe post the piece of code you are using...Which event are you using to set the value...? Form_Load()? maybe after the submit to the new form library the code to set the value isn't running.
    Bryan Strader
    Software Developer
  • 05-06-2010 06:52 AM In reply to

    • ehaze
    • Top 500 Contributor
    • Joined on 12-11-2007
    • Posts 49

    Re: after submit fields not updating

    First I'm trying to clear the field:


                 Public Sub FormEvents_Loading(ByVal sender As Object, ByVal e As LoadingEventArgs)

                 Dim xnDoc As XPathNavigator = Me.MainDataSource.CreateNavigator()
                 Dim xFrom As XPathNavigator = xnDoc.SelectSingleNode("my:myFields/my:txtOpenedFrom", Me.NamespaceManager)

                 xFrom.SetValue("")

                doStuff()


     Then I try and update the field with the new library name:


    Private Sub doStuff()

                Dim xnDoc As XPathNavigator = Me.MainDataSource.CreateNavigator()
                Dim xFrom As XPathNavigator = xnDoc.SelectSingleNode("my:myFields/my:txtOpenedFrom", Me.NamespaceManager)

                xFrom .SetValue("New Value")

    End Sub


     

     
  • 03-25-2011 06:48 AM In reply to

    • BMARU
    • Not Ranked
    • Joined on 03-25-2011
    • Posts 24

    Re: after submit fields not updating

    I am getting the same issue SetValue works only first time to update the field value.Second time trying to update the value through setvalue its not updating the value.

     

    I am not getting the error but I can see the value is changed second time through debugging but it lost when form load in browser

Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.