Generate numbers? - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Generate numbers?

Last post 11-16-2010 05:04 AM by Patrick Halstead. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 11-15-2010 09:38 AM

    Generate numbers?

    I have an InfoPath form, that is a department request form.

    I would like to have it autonumber, much like SQL Server does Identity. I'm actually storing all the information from the form in it's own sql server, so technically, I could use the Identity field as the request number - -

     So here are the questions:

    Can InfoPath track numbers/generate sequential numbers and update with new forms?
    or,
    Can I submit the form to SQL - get the identity/id (@@ScopeID) and then, plug it in the InfoPath form?

    or - any other ideas?

  • 11-15-2010 11:49 PM In reply to

    Hi,

    When I want to do that, i use a list in SharePoint to do the chrono. I increment an list item on each submit.

    With SQL, you can do some manage code to get the autoincrement value when you submit the form.

    RĂ©mi MATAYRON / MVP InfoPath
    Visit my blog : Infopath Blog
  • 11-16-2010 05:04 AM In reply to

    Hi AugustWind,

    Short answer: yes, but you need to design your form from XML and use a Web Service.

    Longer answer: you can create a unique key using a concatenation from your form fields that forms a unique string but if you designed your form from SQL, it will ignore the field. We have provided a workaround to this limitation since 2004. Our database accelerator (DBXL) Web Servuce allows you to set your own unique IDs for your forms' primary key. Another option is to create a GUID using code or qRules and specify this in the mapping but you'll need Web Service or SQL code to make this a true primary key.

    Bottom line: you can do this with code and integration or using Qdabra's off-the-shelf components. It is a best practice. Microsoft left this gap unfilled though and that's why we created DBXL and qRules.

    Best regards,

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