Field values clearing when record is updated - InfoPath Dev
in

InfoPath Dev

Field values clearing when record is updated

Last post 11-26-2007 08:48 AM by Clay Fox. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 11-02-2007 06:25 AM

    Field values clearing when record is updated

    I have a form that submits to an Access db when a button is pushed. A copy of the form is also emailed to a team inbox. When someone opens the form from the team inbox they will assign it to someone via a drop down box on the form. When the task is completed, the form is reopened and a status box is changed to 'completed'. My problem is that I have fields at the top of the form that are autopopulated from a webservice. When the form is updated with an assigned person's name it submits correctly to the database by only updating the fields that were changed. However, when the form status is changed to 'complete', it clears all the fields that were prepopulated from the webservice. How do I stop the clearing of these fields?

  • 11-02-2007 09:51 AM In reply to

    Re: Field values clearing when record is updated

    There must be a rule that is firing or the data connection is being requried that is over writing the values.

    There is a very similar sample solution included with the Database Accelerator, which connects to a DB and has workflow and assignment via email.  You may want to check it out as an example or to increase the potential of your solution. Qdabra Database Accelerator Suite Version 2.1 - Developer

    Filed under:
  • 11-02-2007 01:48 PM In reply to

    Re: Field values clearing when record is updated

    Hi 

    Does your web service update every time the form is opened? If it does that could be the source of your problem.  Either way the web service is interfering with the data due to something changing in the form.  Look at things like default values or similar to root out the source.

    Cheers

    Adam Harding
    Wales
    UK
  • 11-26-2007 05:47 AM In reply to

    Re: Field values clearing when record is updated

    I still have not been able to figure this one out. It's an onload event with the following code:

    function XDocument::OnLoad(eventObj){      XDocument.QueryAdapter.Timeout=60;            var userIDField=XDocument.DOM.selectSingleNode("dfs:myFields/my:LANUserID");            var userID=GetUserID();            if (userIDField.text == "")            {userIDField.text=userID;}} function GetUserID(){      var objNetwork =new ActiveXObject("Wscript.network");      var uid = objNetwork.UserName;      return uid;

    }

     

    Is there a way to get it to conduct the query the first time the form is loaded and then freeze the values in specific fields even if the form is opened and altered?

  • 11-26-2007 08:48 AM In reply to

    Re: Field values clearing when record is updated

    You would need to move the values from the initial query into a group within your form's main DOM.  That way you can preserve them inside the form to reference them later.

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