Submit to Sql, Query for Auto ID, Use it in submit to sharepoint library - InfoPath Dev
in

InfoPath Dev

Submit to Sql, Query for Auto ID, Use it in submit to sharepoint library

Last post 06-10-2008 08:22 AM by rimbaugk. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 06-06-2008 08:57 AM

    Submit to Sql, Query for Auto ID, Use it in submit to sharepoint library

    I could use a little help with the syntax required to pull this off.  I'm am working with Project Requests.

    I have an InfoPath form that submits data to a sql database.  Upon submit a unique id is generated in the SQL table which serves as my Project Request ID. The ID field isn't in my web service.

    Then I want to query that table for whatever key was just created for that record.

    The next submit step is to send it to sharepoint.

    I would like the infopath form file name submitted to sharepoint to be Project Request ID # ......key.  That way the forms always have unique names. Am I on the right track?

  • 06-09-2008 02:42 AM In reply to

    Re: Submit to Sql, Query for Auto ID, Use it in submit to sharepoint library

    You should be able to query a secondary data connection to your table and get the max() id to get the latest record submitted.

    Then yes, you can move that unique ID into your form and use it in the filename.

  • 06-09-2008 07:34 AM In reply to

    Re: Submit to Sql, Query for Auto ID, Use it in submit to sharepoint library

    Thanks Clay.  It works in Infopath, but I still must be doing something wrong on the browser side.  I defined a data connection and added the SQL to it for Max().  Then I used the field when I submit to sharepoint to set it as the filename.  When you say move the unique id to the form.....that might be what I'm screwing up since there is no field in the form to store it.

  • 06-09-2008 10:44 AM In reply to

    Re: Submit to Sql, Query for Auto ID, Use it in submit to sharepoint library

    So are you getting the ID returned? but the filename not reflecting it?

     I would try making it visible in thebrowser form to test.

    I would try adding a field to your form and use that for the filename to test also.

  • 06-10-2008 08:22 AM In reply to

    Re: Submit to Sql, Query for Auto ID, Use it in submit to sharepoint library

    I figured out what I had done.  I created the data connections and converted them to .udcx but forgot to them remove that and add the .udcx back to the project.  All is well now....thanks Clay.

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