How to setup incremental file name calculation - InfoPath Dev
in

InfoPath Dev

How to setup incremental file name calculation

Last post 04-30-2009 11:34 PM by Patrick Halstead. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 04-30-2009 03:14 PM

    How to setup incremental file name calculation

    Here is what I am looking to do: I have an Incident Report form on my web enabled InfoPath form, which is published to a SharePoint site. When I submit the form, it submits the form and the data in it to the document library, with each field in the form showing up in columns in the library. Right now I have it set up to concat the date and time to create an incident report number in the incident report # field on the form, and also use the incident report # as the file name when saving the form/file to the library. I want to set it up a little differently now. What I want to do is have the form look in the document library, find the last incident report number, and increase it by one.  I originally did this through the rules, receive and submit data connections, etc. and had some success but not fully.
    Basically, I want to have the Incident Report # field on my web form to populate with the last incident report number found in the library, +1 So if my last incident report number saved in the library was 134, it would automatically populate the Incident report # field in my new form I want to submit to 135.

     

  • 04-30-2009 11:34 PM In reply to

    Re: How to setup incremental file name calculation

    Hi Lenova27,

    This has to be one of the top 20 requests in this forum. I just answered a post yesterday regarding it. Bottom line is that you can't do it because you can't ensure that another person isn't submitting at the same time. You could do a two submit solution. Submit once, but don't close the form. Then, use a SharePoint list adapter to query the list, find the one you submitted, read the ID column and set that into your form. That works, but requires a double submit. Another option is to just use a GUID (global unique identifier) for your files name and incident number but they are long strings of characters and numbers and not very "friendly" to users. I'd go with the double submit for now. Will require adding a couple submits, a ShP data connection, and some rules to your form. Plus, when the list gets long, you will have performance issues when you filter the list to get the correct ID (you'll need to filter using a unique identifier - try using a date time stamp for now).

    We've done this before. It would take about an hour to setup. If you want us to help you, we can do it, but you'll need to purchase a "Support Pack". Go to Qdabra.com -> Products -> Support - if you are interested. Otherwise, go for it. We'll be here to answer questions in the forum as they arise.

    Patrick Halstead
    Project Manager at Qdabra
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.