Auto number InfoPath forms on submit - InfoPath Dev
in

InfoPath Dev

Having trouble finding a blog or post that answers your question? Check out our Custom Search Page

Auto number InfoPath forms on submit

Last post 07-31-2017 02:24 AM by mattdanielc2. 11 replies.
Page 1 of 1 (12 items)
Sort Posts: Previous Next
  • 07-13-2017 07:57 AM

    Auto number InfoPath forms on submit

    Hi guys

    I followed the guide here:

    http://www.bizsupportonline.net/browserforms/autonumber-infopath-form-submitted-sharepoint-library.htm

    To create a filename that auto generates sequentially (that's what I need).

    It works fine - but - I can't work out how to then open the form and makes changes to it...and then save it again.

    Previously I did this by having a 'Save' button which people clicked if they made changes. This then just used the submit function again (overwriting the filename). But of course because of the sequential numbering something is going wrong and it creates a new form called 'NaN'.

    Any ideas how I can save the sequentially numbered form fine??

    Thanks for any help :)

  • 07-13-2017 08:11 AM In reply to

    Re: Auto number InfoPath forms on submit

    Add a field to your data source for the form name - no need to display it on the form. In your submit rules, have a rule that checks if the field is empty. If it is, use your auto number logic to get the next number, and set the new form name field. In your submit connection, use that field for the form name. Make sure your submit connection is set to overwrite existing. Now you should have a stable form name for the life of the form. :)
    Hilary Stoupa

  • 07-13-2017 08:52 AM In reply to

    Re: Auto number InfoPath forms on submit

    Hi Hilary,

    Thanks for this. I've spent all of this time since you posted trying to do what you suggested but I can't - I just keep getting errors.

    Sorry to be a pain - I'm no expert :(

    Can anyone explain exactly what I need to do this?

    What Hilary suggests above is exactly what I want. A field that auto populates depending on what number the previous form has. So when the user submits the form it auto names itself (1,2, 3 etc)

    Then if the user opens the form and makes a change - they can click a 'save' button and it will overwrite their changes but NOT update the field number.

    Any help?

    Thanks :)

  • 07-13-2017 09:55 AM In reply to

    Re: Auto number InfoPath forms on submit

    Attach your form under the options tab in a reply and I'll give you a hand with it.
    Hilary Stoupa

  • 07-14-2017 01:29 AM In reply to

    Re: Auto number InfoPath forms on submit

    Hi Hilary

    Wow thank you for the offer.

    I've attached the form. So the form attached has the workaround provided by: http://www.bizsupportonline.net/browserforms/autonumber-infopath-form-submitted-sharepoint-library.htm

    So in data connections you will see 'Main submit' and 'RetrieveIDs' which are both needed for the automatic numbering (according to the link above). But this then causes me problems with how I save the form after some changes to it once submitted (and not affect the filename) and some other formulas and stuff I want to use.

    So what I'm really after is something like you suggest - a field that is able to auto populate (based on the other forms in the Library) and then the filename for my forms is this field.

    Thanks for your very kind offer of help :)

  • 07-14-2017 01:35 AM In reply to

    Re: Auto number InfoPath forms on submit

    This file attached is my file before I started to mess around with the auto numbering if anyone knows how to do auto numbering then is a 'fresh' form to start from.

  • 07-14-2017 07:47 AM In reply to

    Re: Auto number InfoPath forms on submit

    Can you explain the two different SharePoint library submit connections? They both seem to submit to the same library but with a different form name?
    Hilary Stoupa

  • 07-14-2017 08:26 AM In reply to

    Re: Auto number InfoPath forms on submit

    So 'SharePoint Library Submit' was my own original library submit. So this gives a file name of date - field number

    'Main submit' is the library submit that was suggested by the link I've included in the posts.

    You may find it easier just to use my original form which only has my original data connection in (Book Orders 3 attached) so this one doesn't have anything added by that link.

  • 07-14-2017 12:00 PM In reply to

    Re: Auto number InfoPath forms on submit

    And, sorry, one more clarification - what, in the end, do you want your file names in the library to be?
    Hilary Stoupa

  • 07-15-2017 12:03 AM In reply to

    Re: Auto number InfoPath forms on submit

    It's ok!

    I want my filenames to be auto numbered. So the filename would be something like 'Request - 1' then the next would automatically be 'Request - 2' etc

    The link I provided enables me to do that - but then gives me other problems that I can't figure out. So I'm after a method like you suggested - a field that can auto generate the numbers instead - and then the filename is that field.

    Thanks :)

  • 07-15-2017 05:12 AM In reply to

    Re: Auto number InfoPath forms on submit

    I only modified the buttons in the entry view. I would delete the "main submit" data connection and just keep using the SharePoint Library submit connection. I modified the Submit rules to set the ReportNumber field instead of the autonumber field. You'll see in the submit rules, I only set the ReportNumber if it is blank. I added a similar rule on your Save button. The SharePoint Library submit connection used the ReportNumber field for part of the file name, so it seemed to me the simplest approach was just to set that and keep using it. The trick is to only set it the first time the form is submitted. :) Save the attached form locally, right click and select Design to open in design mode. From there you can look at the rules, preview, etc.
    Hilary Stoupa

  • 07-31-2017 02:24 AM In reply to

    Re: Auto number InfoPath forms on submit

    Thank you so much Hilary! Sorry for the delayed response - been on holiday for 2 weeks. The form works great thank you so so much :)
Page 1 of 1 (12 items)
Copyright © 2003-2017 Qdabra Software. All rights reserved.
View our Terms of Use.