1

I have a form library with the following content types

enter image description here

I have set each form to be saved with the following format Company Name - Network Information

We only need one network information form per customer that's why I set the filename structure this way using the concat function

So once the network information form has been created and information entered I will still need users to be able to go to the form and edit the info.

The problem I have found it if a user does not realize the network information form for the customer has been created, if they create the form again it will overwrite all the info in the original form

Hope that explains it better, thanks

1

I'm not quite sure I understand what you are after. If a form is published as a content type, then users can create new forms in the form library. Each form will have different data. Some forms may have similar data. Your form template should have a rule that ensures that each form has its individual form name, so nothing gets overwritten.

A form library is meant to have many forms created from the same template.

If that is not what you are after, please edit your question and explain your requirements.

I can then amend this answer.

Edit after more information was provided:

Set up a rule that gets triggered when the company name is filled in. Look up if a document with that name (Company - Network Information) already exists. If it does, switch to a view where the user sees a message like "This form already exists. Please edit the existing form."

For the lookup you may want to set up a secondary data source to your document library, so you can query that data connection without disturbing the main data connection. Set the query parameter to the name of the form, then query the data connection. Count how many items are returned. If it is 0, the form does not exist.

Second edit: How to create the rule (rough guideline, off the top of my head)

  • You need to set up the secondary data connection to the main data source, and select the file name as one of the fields.
  • Trigger the rule when the company name is changed -- set the rule on the company field "when the field changes"
  • Action: Set the query field of the secondary data connection to the same value that you would use for the file name of a new form, e.g. the company name concatenated with the text " - Network Information.xsn".
  • Action: Query the secondary data source. The secondary data source now contains all items that have the same file name as what you put into the query field. If a company form already exists, that should be one item. If the company form does not exist, she secondary data source should be empty.
  • Create another rule that triggers if a count of the secondary data source is greater than 0.
  • Action: Switch to a different view that shows a message for the user and a button that closes the form without saving.
  • Can anyone else help me with this? Thanks – Matt Saunders Nov 29 '14 at 10:13
  • I edited my answer. – teylyn Nov 29 '14 at 22:14
  • Thanks for the answer, I'm very new to infopath, can you please tell me exactly how to setup the rule etc – Matt Saunders Nov 29 '14 at 22:18
  • Maybe you should pick up a book about Infopath and learn a few basics, i.e. how to create a rule and how to create and query a secondary data source on SharePoint. These things are basic skills that you will need in most InfoPath forms. Microsoft has this: Introduction to rules and Add rules for performing other actions – teylyn Nov 30 '14 at 9:46
  • I added some more detail on how to create the rule. – teylyn Nov 30 '14 at 10:03

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.