Stop users creating an infopath form if it already exists in Forms library - InfoPath Dev
in

InfoPath Dev

Stop users creating an infopath form if it already exists in Forms library

Last post 12-03-2014 03:55 PM by donstephen. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 11-30-2014 02:13 AM

    Stop users creating an infopath form if it already exists in Forms library

    I have a forms library with forms to collect information about our clients, I work for an IT support company, the forms I have are as follows

    Citrix Information
    Infrastructure Information
    Network Information
    etc

    We only need one of each form for each client where we can add or remove info from the form, I have set each form to be saved with the following format Company Name - Form name, the way this works in I have a drop down field with all the clients from SharePoint, I then have a field with a default value of the from name, for example 'Citrix Information' the I use the concat function to bring them together which give me for example Smith Clothing - Citrix Information

    So once the Citrix 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 which is working without any problems

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

     How can I stop this from happening?

    Thanks 

  • 11-30-2014 09:20 PM In reply to

    Re: Stop users creating an infopath form if it already exists in Forms library

    Hi Matt,

    I think the easiest way here is to add a logic to the submit button which queries the library with the form name first before the submit to library action. Add another rule which stops the next set of actions (submitting to library) if there is returned data (from the Form Name query previously added). It would also be best to add an error message which like "The form already exists. Please create another name". Does this make any sense?

    Don Stephen Lambatin / Support Engineer
    Qdabra Software
  • 11-30-2014 09:33 PM In reply to

    Re: Stop users creating an infopath form if it already exists in Forms library

     Thanks for the reply, can you explain in a more detail about setting up the rule to query the form library on the submit button

    Just to clarify the file name for the form in built by using the concat function to pull the company name the user selects from the dropdown and a field I have on the form which I gave a default value for example 'Network Information'

     

  • 12-02-2014 06:12 AM In reply to

    Re: Stop users creating an infopath form if it already exists in Forms library

    Hi Matt,

    If the form already has a field which holds the Form Name value, you could use that for the query value. If not, then you would need to generate a formula which would be equivalent to that value (concatenating values along with the value from the dropdown). After you have done this, simply query the Library using the Form Name value as the filter. For the next rule, you would need to use a field which you could name as Stop. Add a condition to this rule that if the number of rows returned (Form Name query) is greater than zero, set the value of the Stop field to blank, and tick the check box Do not run remaining rules.

    What this logic does is that it stops the rest of the action rules. If the query did not return any data, then that would mean that there is no form with the same name. Moving forward, the next set of actions including the submit to library action will occur. Hope this helps..

    Don Stephen Lambatin / Support Engineer
    Qdabra Software
  • 12-02-2014 07:43 PM In reply to

    Re: Stop users creating an infopath form if it already exists in Forms library

     Hey Don

     Thanks for your help so far, I understand the concept of this but I've never actually implemented this before, if I provided you with a teamviewer session would you be able to help me please?

     I need to get this up and running sooner rather than later since it's a work project.

     

    Thanks again

    Matt

  • 12-02-2014 11:01 PM In reply to

    Re: Stop users creating an infopath form if it already exists in Forms library

    Hi Matt, I'm attaching a sample form which you could use as your reference.
    Don Stephen Lambatin / Support Engineer
    Qdabra Software
  • 12-03-2014 01:05 AM In reply to

    Re: Stop users creating an infopath form if it already exists in Forms library

     Thanks Don, I just tried to open the form but it said "This form cannot be opened because it require domain permission level and it currently has restricted permissions"

  • 12-03-2014 03:55 PM In reply to

    Re: Stop users creating an infopath form if it already exists in Forms library

    Hi Matt, I sent you an email. You can change the data connection to test the form, or copy the logic on the actual form.
    Don Stephen Lambatin / Support Engineer
    Qdabra Software
Page 1 of 1 (8 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.