Form Library and Document ID - InfoPath Dev
in

InfoPath Dev

Form Library and Document ID

Last post 09-26-2010 07:23 PM by kerriejones. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 09-20-2010 11:39 PM

    Form Library and Document ID

    Over the past weeks I have created a number of InfoPath 2010 forms, each of which is associated to its own Form Library.

    My latest form/form library will not associate a Document ID with my InfoPath forms.

    I deleted the library, recreated it and then started again by doing the following, which I know would be unconventional

    1.       Upload document                        Document ID = Form-11-1

    2.       Fill out InfoPath document          Document ID is blank

    3.       Fill out InfoPath document          Document ID is blank

    4.       Upload Document                        Document ID = Form-11-4

    It is now the next day and the Document ID has appeared.  This is all well and good, but I need to promote that Document ID to a workflow when the form is submitted, but of course it is not available when I need it.Remember this is only happening to the one library, all others are working OK.I have run the two timer jobs on numerous occassions and it has not made any difference to the result.

    What have I done wrong?

  • 09-23-2010 01:34 AM In reply to

    Re: Form Library and Document ID

    Hi Kerrie,

    We'd have to look at your forms and your libraries to ascertain what the issue is.

    Probably, it's because the first time you fill out a form the form doesn't know the Document ID until it is submitted. You could add a unique ID to your form ahead of time using concat and some fields in your form (I recommend fields like submitter, datetime, status, etc.) and set the value as part of a concat when they press submit. Then, you can promote that value and use it in the SharePoint submit adapter to set the name automatically. 

    Hope that made some sense... let me know if not. 

    Patrick Halstead
    Project Manager at Qdabra
  • 09-23-2010 04:14 PM In reply to

    Re: Form Library and Document ID

    Hi Patrick,

    What you are saying does makes sense.  I was using a unique ID in 2007 but decided to use the inbuilt feature of 2010 this time round.  Since receiving this email I have performed the following:

    • Deleted all documents in the library
    • Uploaded a document - this document automatically gets the Document ID assigned
    • Fill out my InfoPath Form - alas NO Document ID

    I would really like to continue down this path, and as I said before, it is working on my other two forms and libraries which were created the same way.

  • 09-24-2010 01:22 AM In reply to

    Re: Form Library and Document ID

    Well, SharePoint document IDs are bad because they don't migrate to other systems. I strongly recommend using a GUID or a unique Key that you construct in the form's logic on submit. We used DocIDs for many years and finally adopted a policy of using Keys for all of our solutions. They're easy to create and they are better than DocIDs because they are more transportable, contain information about the form, and don't require submit-query-submit logic to set in the form the first time.

    If you insist on DocIDs, I wonder if something changed in ShP 2010. Have you looked at Clayton Cobb's blog post on how to do this? It suffers the same problem that multiple documents submitted at the same time can end up getting the same DocID (unless you do the submit-query-submit) but it might be worth looking at.

    Patrick Halstead
    Project Manager at Qdabra
  • 09-26-2010 07:23 PM In reply to

    Re: Form Library and Document ID

    Hi Patrick,

     My problem with this particuular form was because I had code behind.  When I published the form as an administrator approved form, everything started to fall into place.

    I will however take note of your comments for the future.

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