Unique ID Generation - InfoPath Dev
in

InfoPath Dev

Unique ID Generation

Last post 04-09-2012 09:07 AM by Hilary Stoupa. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 04-05-2012 08:11 AM

    Unique ID Generation

    Hey All,

    Hopefully this is an easy one. What is the best way to create a unique ID for a form that is being submitted to SharePoint 2007?

    Just to clarify I would like Infopath to be creating the Unique ID and not SharePoint. I use Infopath 2007

     Thanks in advance

     -Daniel

  • 04-05-2012 11:18 AM In reply to

    You could generate a GUID using qRules and use that as your ID.  Another method could be to take the max(ID) + 1 on the current IDs of the list.
    Anson Hidajat
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™

  • 04-05-2012 11:34 AM In reply to

    Thanks for your response, but is there a way to do this directly from Infopath 2007 without having to use third party products or changing anything on the sharepoint list? I would like to use just the native Infopath 2007 software to complete this if possible.

    Thanks

     -Daniel

  • 04-09-2012 06:26 AM In reply to

    Bump...Anyone?
  • 04-09-2012 06:55 AM In reply to

    Patrick Halstead
    Project Manager at Qdabra
  • 04-09-2012 08:38 AM In reply to

    As Anson mentioned, an option is to query the library you will be submitting to, and then use a formula to get the max ID from that list and add a one to it. Please do this right before submitting so you don't end up with multiple forms with the same ID number.

    Hilary Stoupa

  • 04-09-2012 08:49 AM In reply to

    Patrick, thanks, I will have a look at that to see if it helps.

     Hilary are you guys refering to the ID field in a SharePoint List? If so I would really like to avoid this as the form will be copied and moved to another list which will replace the ID from the original list anyway so this wont work. I would really like to find a way to create this unique ID inside of Infopath so I can use that as the saved document name in SharePoint without it changing as the form gets moved around between SharePoint lists.

    Thanks for any additional help

    -Daniel

  • 04-09-2012 09:07 AM In reply to

    Yup, we are referring to an ID in the SharePoint library the document would be submitting to - I hadn't realized that your form would be moving around. I can't think of a way you can do this inside your form with no dependency on secondary data of some kind - you need to know what numbers have been used, after all. I suppose you could leverage a SharePoint list for this, and use a CAML query to submit each id to the list as used.

    Hilary Stoupa

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