2

I am an Infopath newbie and am sorry if this is something I should have found with Google. I've searched for an hour or so and can't find anything similar.

First, my company uses Sharepoint 2010, however I only have access to InfoPath 2007 (possibly because we are still on Office 2007). Second, I cannot use Sharepoint designer because it has been disabled for reasons that I don't know.

I have created an InfoPath form that feeds a form library. I feel like it would be best to store the information in a Team Site List, however, I need the conditional formatting that is available in an InfoPath form. The Team Site says I need InfoPath 2010 in order to use a customized form to fill data in a Team Site List.

I can create new entries in the form library just fine, everything works great on that end. But, if I edit a previously entered document and then click submit on the form it will submit a new document. What I would like to achieve is to have the form simply edit the existing document. I'm sure this behavior is due to the Submit Button on the form.

So the question: I can see two ways of doing this, programming an Edit Button on the form (no idea how to do that). Or having a different form for the Edit Form. I see that this is possible with Sharepoint Designer, but can't figure out how to do it without access to that tool. I have viewed the library in Explorer and see all the different documents (most are .aspx), is there a default file name that will be used for a .xsn document that is the Edit Form?

1 Answer 1

1

You can do this by just changing the rules that are executed on the Submit button.

Let the rules first check if the current item has a specific field value set that can only be found in an existing form. You may even need to create such a field just for the purpose of this check. Let's say you create a helper field called IsNew.

Let the Submit button check if IsNew contains the value "No". If so, update the existing form, exit and close. Do not run the remaining rules.

If IsNew does not contain "No", set the value of IsNew to "No", then save as a new form.

5
  • Maybe then the real question should have been "How do you update an existing form?" I assume this would have to be with code? But, your example uses rules. Short version: Nowhere in InfoPath 2007 submit options do I see "Update Existing Form."
    – jerussell
    Commented Feb 10, 2014 at 21:13
  • You need to open the form with InfoPath Designer. Download the form to your computer. If InfoPath Designer is installed on your machine, right-click the form and select Design in the context menu. That will open up IP Designer and you can edit the form.
    – teylyn
    Commented Feb 11, 2014 at 0:29
  • Sorry, I'm using the wrong words to describe the different pieces of the puzzle. I know how to edit an existing form. The problem is updating an existing document in the form library. You said to create a rule for the submit button based on a helper field (easy enough, I get that), but nowhere in the rules for the submit button is there a choice to update the existing document. It will always submit a new document to the library rather than just updating the current document.
    – jerussell
    Commented Feb 11, 2014 at 15:41
  • If you use IP Designer to make changes to the underlying form (template) logic, like buttons etc., these changes will apply to existing forms (documents) when you re-publish the form template to the library. So, if you change the rules of the Submit button, the new rules will apply to existing forms (documents), too. You can fine-tune how/when new versions of a form are applied to existing forms (documents) in the Form Options under "Versioning". The default is to "Automatically upgrade existing forms".
    – teylyn
    Commented Feb 11, 2014 at 21:10
  • Keep in mind that the document stored in the library consists purely of XML. The XML is rendered with the form template, and the template can be changed and re-published to present the XML in a different way.
    – teylyn
    Commented Feb 11, 2014 at 21:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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