Making form name unique without using ID number - InfoPath Dev
in

InfoPath Dev

Making form name unique without using ID number

Last post 08-30-2017 11:04 AM by Hilary Stoupa. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 08-28-2017 09:03 PM

    Making form name unique without using ID number

    So I've created a form that's published to a form library. I would rather have done this over a list but I needed repeating tables. The form is meant to be filled out put through a workflow and at some later date possibly revised. The end users don't want multiple copies of revised forms they just want to the one form and use version history in case they want to roll back or view any past changes. My issue is I have my Submit data connection overwriting any existing form but I don't have enough static information on the form to generate a unique file name. Which I'm doing by using Concat and two other fields. Therefore two people can create two separate forms but since the names can be the same one can overwrite the other and we don't want this to happen. I can use the now function to make each unique but when the form is revised it will create a new one and we want all the revisions to stay in the one form. I can use the workflow to pull the ID number from the form library after it's created but again if I revise the workflow will once again change the name using another ID number. My question is there anyway to make an Infopath form unique the same way it would be if it was a list form and I already had the ID number. Many thanks in advance.
  • 08-29-2017 03:48 PM In reply to

    Re: Making form name unique without using ID number

    I usually add a field to the form's main data source called something like "FormName". I don't show it on the design canvas anywhere. I set the submit connection to use that field for the name. Then, when the submit button is clicked, via rules, I check to see if that field is blank. If it is, I set it to something I know will be unique (usually including user name & the now() function). Since that rule only executes when the field is blank, it will only execute one time, and since the submit connection uses the FormName field for the name, it will have a stable name for the life of the form. Make sense?
    Hilary Stoupa

  • 08-30-2017 10:05 AM In reply to

    Re: Making form name unique without using ID number

    Thank you for the answer and yes that makes total sense. My only question to that is how to change the submit connection to choose that FormName field. When I open up the Submit Data Connection as you know it has the two fields one to choose the Document Library and File Name. There I can choose to build my unique name using Concat but I can't see how to actually change that string to go from name to the aforementioned FormName. Please forgive all the questions it's been some time I've had to create Infopath forms and I'm a bit rusty. Thank you
  • 08-30-2017 10:12 AM In reply to

    Re: Making form name unique without using ID number

    Well, when you click on the fx button for the File Name, just click on the select field or group button and select your new "FormName" field from the main data source?
    Hilary Stoupa

  • 08-30-2017 10:41 AM In reply to

    Re: Making form name unique without using ID number

    Thank you so much Hilary as always you have been a tremendous help. Have a great day.
  • 08-30-2017 11:04 AM In reply to

    Re: Making form name unique without using ID number

    You too, happy I could help. :)
    Hilary Stoupa

Page 1 of 1 (6 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.