Update ID field from Sharepoint in InfoPath Form - InfoPath Dev
in

InfoPath Dev

Update ID field from Sharepoint in InfoPath Form

Last post 10-03-2007 11:04 AM by Suzanne. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 10-02-2007 01:23 PM

    • Suzanne
    • Not Ranked
      Female
    • Joined on 04-12-2007
    • New York City
    • Posts 13

    Update ID field from Sharepoint in InfoPath Form

    I need to capture the corred ID number on an InfoPath form. I added a Data Connection to retrieve the ID field information but it doesn't give me the ID number of the form I am writing and it doesn't update the information.

    How do I get my field to give me the ID field which will be assigned when I submit my form to the SharePoint Forms Library?

  • 10-02-2007 03:21 PM In reply to

    Re: Update ID field from Sharepoint in InfoPath Form

    So you want the form to include the SP ID?

    I am not sure there is a way to get it in advance for a new item since it is generated when the form is saved.

    What you can do I believe it perform two submits. A two step process should be undetectable to the user but accomplish your goals.

    When the user submits, have it submit the new form once, then requery your data connection to get the ID number, save it in the form, and immidiately resubmit to sharepoint and update the form and then close or whatever.  You would need to have the ability to overwrite the xml files in the library but I think that would be the way to do it.

    You could also have it triggered earlier in the user process if you need the value sooner.  The only issue if the user does not complete the form or if you have validation that would be needed before it could be submitted.

  • 10-02-2007 04:44 PM In reply to

    Re: Update ID field from Sharepoint in InfoPath Form

    One other possible solution is to add a connection to the lists table for sharepoint. The lists table stores the next available ID in one of its columns. As long as you have the list ID you should have no problem getting the ID from that table. You may run into some issues if multiple users submit at the same time however but I'm sure that can be worked out.

    Shaun Nieves
    Sharepoint Manager
  • 10-03-2007 07:39 AM In reply to

    Re: Update ID field from Sharepoint in InfoPath Form

    Thanks Shaun!

    That would be my concern too. If multiple users are anticipated, you would have to check right before submission and then maybe double check. The likely hood is not real high but there is a chance.

  • 10-03-2007 10:00 AM In reply to

    • Suzanne
    • Not Ranked
      Female
    • Joined on 04-12-2007
    • New York City
    • Posts 13

    Re: Update ID field from Sharepoint in InfoPath Form

    It would be fine to have 2 submits.  Could you tell me what I would have to do to get the ID number after I submit the form?  I've already put in a set a field's value but it isn't picking it up.

    Please help! I've a meeting with them today at 4 p.m.

    Thanks!!!
    Suzanne

  • 10-03-2007 10:18 AM In reply to

    Re: Update ID field from Sharepoint in InfoPath Form

    After you submit initially, keep your form open.  You may have to switch your submit to rules so you can have multiple actions.

    Once submitted you would query your SP view again. Identify the newly added form.  Save the ID or do what ever you would need to do and then save it at the end so that it is stored in the form for the next time.  Or if you don't need it saved in the form you would not need to save it again.

  • 10-03-2007 11:04 AM In reply to

    • Suzanne
    • Not Ranked
      Female
    • Joined on 04-12-2007
    • New York City
    • Posts 13

    Re: Update ID field from Sharepoint in InfoPath Form

    Thanks so much for your help. I had set up a submit and sent it to the database and then set the fields value and then closed the form but it didn't update.  I had to resend to the sharepoint query.  Now it works great!

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