Saving a form to SharePoint - InfoPath Dev
in

InfoPath Dev

Saving a form to SharePoint

Last post 11-28-2007 04:19 PM by 10basetom. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 11-28-2007 01:32 PM

    Saving a form to SharePoint

    Hello, I've created a simple address book form that I've published on SharePoint. Everything's working okay so far, but I've encountered a problem: when I edit and submit an existing contact in the address book form, the contact is not updated but instead a new contact is added to the form library. I currently using a formula to generate the contact filename ("Contact - [FirstName] [LastName].xml"). What's the best solution to edit a contact without creating a new contact entry? Thanks, Tom
  • 11-28-2007 02:40 PM In reply to

    Re: Saving a form to SharePoint

    What is the name of the new contact file?

    You may need to look at the document library settings and see if overwrite is enabled.

  • 11-28-2007 03:31 PM In reply to

    Re: Saving a form to SharePoint

    A new contact is created only if you change the first or last name on an existing contact because of the file naming rule I mentioned before. However, I was hoping InfoPath would be smart enough to know that I'm modifying the existing contact, so if I change a contact from John Doe to Johnny Doe, it should *rename* the contact filename to "Contact - Johnny Doe.xml" instead of adding a new contact to the list.

    Basically, I'm trying to emulate something like Yahoo! Address Book (when you edit your Yahoo! contact's name and hit 'Save', it edits the current contact you're editing instead of adding a new contact). Tom P.S. Yes, overwrite is currently enabled.
  • 11-28-2007 03:39 PM In reply to

    Re: Saving a form to SharePoint

    Ok I gotcha.

    You could change your file naming to a numeric and then promote the name fields, etc. This way the file (link) could remain the same and you would see the latest information in the additional columns of the Library.

    Or you should look at deleting items from a library via a caml.  You could add functionality to your form where if it was a name change it would delete the previous form so there was still just one.

  • 11-28-2007 03:40 PM In reply to

    Re: Saving a form to SharePoint

    Actually the best implementation I have seen is to put your contacts in a database and then have one form that can browse the contacts, lookups, search, etc.

  • 11-28-2007 04:19 PM In reply to

    Re: Saving a form to SharePoint

    Hi Clay, Thanks for your help. I've never heard of CAML before, so I'll go read up on it. I think for the time being I'm going to change the file naming rule to an incrementing number. Unfortunately my contraint is that I don't have access to a database -- I can only publish to SharePoint. Tom
Page 1 of 1 (6 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.