How to get the ID of the item added to the Sharepoint list - InfoPath Dev
in

InfoPath Dev

How to get the ID of the item added to the Sharepoint list

Last post 08-02-2008 10:19 AM by poonam.banthia. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 07-20-2008 06:39 AM

    How to get the ID of the item added to the Sharepoint list

    Hi

     I am creating an infopath 2007 browser-enabled form. I am using the standard process to submit the data to a sharepoint list. Each item in list is assigned a unique ID that is stored in the "ID" column of the list. I need to use this value for further operations in my form.

    How can I get this value returned after the item is successfully added to the list?

    Thanks!!

    Poonam

  • 07-21-2008 11:15 PM In reply to

    • Shiva
    • Top 25 Contributor
    • Joined on 04-15-2005
    • India
    • Posts 694

    Re: How to get the ID of the item added to the Sharepoint list

  • 07-22-2008 10:47 PM In reply to

    Re: How to get the ID of the item added to the Sharepoint list

    Hi Shiva,

    Sorry, but I could not understand how can this help me with my issue. I'll try to explain the scenario in a bit more details.

    I have a sharepoint list say Products into which items are added from an infopath form. Since the product name is not a unique column, I need something that can be used to uniquely identify an item in the Products list. And hence I think the ID column is the only thing that I can use.

    Can you pls explain in detail how to go about this issue?

    Thanks!!

  • 07-24-2008 10:15 AM In reply to

    Re: How to get the ID of the item added to the Sharepoint list

    Add a secondary data source pointing to the list (Manage Data Connections - Create New Connection to receive data) add the ID field to the connection.

    Some screen shots are on my blog http://sharepoint2007only.blogspot.com/

    Hope that helps!

  • 07-30-2008 10:15 AM In reply to

    Re: How to get the ID of the item added to the Sharepoint list

    Hi Paul,

    Are u talking about adding a Receive Data connection to the Products Custom List?

    Thanks!!

  • 08-01-2008 10:15 AM In reply to

    Re: How to get the ID of the item added to the Sharepoint list

    Yes, if you want an ID after submit, then you should be good to go.  If you need to give the record an ID before submitting the form, then you will have some complex issues. (too complex for me, anyway)  I've seen posts on using a SQL table to do that.

    My example uses a workflow to set a value in a form library field using the ID and a prefix.  It is then displayed in a field on the form by using a seconday data source to recieve data from the list (the field that the workflow set the value of).  You could just use the ID itself, but I don't like to show "meaningelss" numbers to end users.  Meaningless to everyone but the system itself. 

  • 08-02-2008 10:19 AM In reply to

    Re: How to get the ID of the item added to the Sharepoint list

    Thanks for your inputs Paul. Let me explain you my requirement in details:

    I have created an infopath form using which the users create Products and also create some metadata information once the Product has been created. While creating the Products the users provide the Product Name but this is not a primary key as per the business requirements. When the users submit the form I am adding an item in the Products list. Now I need to create a unique identifier for identifying the created product which I thought can be "ProductName_ID" & I can use this later while storing the metadata information abt the product.

    Consider the following scenario:

    Step 1: Create a product with name "Product1". Once the product is added MOSS autogenerates an ID for the item

    Step 2: Again create a product with the same name "Product 1". Another ID is generated for this item.

    Now if I create a Receive Data connection how can I get the desired ID for the two products created i.e. I have no means to query the list to get the correct ID.

    Pls suggest a way to meet this requirement.

    Does the "Submit Data Connection to a Web Service" have any return parameters?

    Thanks!!

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