Best way to show edit history on a browser form? - InfoPath Dev
in

InfoPath Dev

Best way to show edit history on a browser form?

Last post 11-13-2009 08:45 AM by nthompson. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 11-13-2009 07:54 AM

    Best way to show edit history on a browser form?

    This is my first infopath form I've developed, so if anything is painfully obvious, please let me know. 

    I'm currently designing a browser based form that will be hosted in a SharePoint form library. A request my manager has made of it is to have a table or some type of field at the bottom of the form to show the "edit history" of the form. Basically, every time the form is updated, I need to capture the user's name and time that it was updated and keep it displayed at the bottom. At first I was trying to do this without custom code, but I couldn't figure out a way to do it.

    I have 2 buttons on the form. An "update" that submits it to a form library and a "close" button. The Update button submits it using the action "Submit using a data connection". I added some code behind it to log the information I needed in a repeating for the edit history. It doesn't seem to work. I click the button and it submits the form, but doesn't update the history table. If I disable the rules, it updates the edit history table but obviously doesn't submit to the library.

    What is the best course of action for me to take? Should I use code to submit to the library as opposed to rules or is there a better way of creating the Edit History table?

  • 11-13-2009 08:39 AM In reply to

    Re: Best way to show edit history on a browser form?

    I would recommend to the manager that instead of trying to custom code something like this that will make your life much more difficult, you should rather not introduce code to your form so that it doesn't have to be administratively approved and pushed through Central Admin every time you make a single change, and instead just use version control on the library.  Doing that will show exactly who edited with a date-time stamp and will even show the fields that were changed if those fields are promoted to the form library.

    If you absolutely must continue with this task, then it will just require proper code that is able to append items to a repeating table on a button click.  I also wouldn't have a separate close button - just close the form as part of the submit.

  • 11-13-2009 08:45 AM In reply to

    Re: Best way to show edit history on a browser form?

    Thanks for the help. I did have the close as part of the submit, but when I discovered that Rules execute before code I realized that wasn't going to work. I think I'll go with the versioning instead of the edit history. I'm not sure why I didn't think of that before.

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