1

I seemed to have broken something fundamental. When I edit a SharePoint InfoPath form List Item, it submits an entirely new list! How can I make my Submit button perform the "old" way and just "save" the data to the same item?

  • Does your Submit button have rules attached to it? How is your Main Data Connection configured? – Aron Foster Dec 12 '13 at 21:28
  • yes has rules...should I add not to submit to list if ID is not blank? – April Drake Dec 12 '13 at 21:43
  • No, you have to submit to the list for changes to be saved. How is your main data connection configured? Is the item title using the current date/time? Is this a list or library? – Aron Foster Dec 12 '13 at 22:29
  • it is a list, the title doesn't use date/time. – April Drake Dec 13 '13 at 1:50
  • I also have the same issue. Whenever Info Path is edited and saved it makes a new entry. Would be nice if someone can help with a solution. – Biju Joseph - MCSD Dec 13 '13 at 4:21
2

Follow the below steps to make your file name unique when you edit and save

  • Step 1 – Create a Hidden Field
  • Step 2 - Add a Submit data connection
  • Step 3 - Add Custom Rules to Submit action

Step 1 – Create a Hidden Field

A hidden field is a field that exists in the data source of the form but is not visible to the user.

The easiest way to create a hidden field is to drag-and-drop a text box control onto the form template’s view. Rename the text box to ‘filename’ and click OK. Then select the filename text box and hit delete to remove the field from the view.

Creating Hidden Field

Step 2 – Add a Submit Data Connection

Go to Tools, Data Connections and click Add. Create a new Connection to Submit data to a SharePoint document library: Data Wizard

Data Wizard2 Enter the document library, and click the fx button and Insert the field ‘fileName’ in order to give the form submitted the name stored under ‘fileName’. Select ‘Allow overwrite if file exists’. Data Wizard 3

Give the data connection a name: Data Wizard Name

Step 3 – Add Custom Rules to Submit Action

Go to Tools, Submit Options, and click on Rules. Submit Option

Add two rules as follows:

  • Rule 1 (fileNameBlank):

    fileNameBlank

  • Set condition: filename is blank: enter image description here

  • Set Action 1: Set field’s value filename = concat (Myfield, now()):

Use field on the form i.e., contactName, followed by the function now() to add the date & time and give the form a unique name.

enter image description here

  • Set Action 2: Submit using a data connection (the one created in Step 2): enter image description here
  • Rule 2 (fileNamenotBlank):

enter image description here

  • Set Condition: filename is not blank: enter image description here
  • Set Action: Submit using a data connection (the one created in Step 2): enter image description here

You should now have the following 2 rules setup for Submitting Forms: enter image description here

courtesy :- http://www.codeproject.com/Articles/37093/Submitting-an-InfoPath-Form-to-SharePoint-with-a-U

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.