SharePoint ID

E

E

I have read though different threads, but have not found a "simple" answer
(which it seems like there should be).

Every form in a SharePoint Library has an "ID" column which uniquely
identifies it. It is the one generated by SharePoint and not Infopath. When
opening an existing form, I want the corresponding Sharepoint ID to show up
in a text box on the Infopath form.

-*-
 
S

Stephan van Eeden

You can add a data connection to receive data, then you set the source of
the data to "sharepoint library or list"

You specify the URL of your site and then you choose your form library.

It will then present you with a list of all the columns in that library(Of
which ID is one).

Make sure you check the check box at the bottom which states "Include data
for active form only".

Depending on your need check the "Automatically retrieve data when form is
opened" (You can uncheck it and make another rule to execute this query or
you can do it in code)

Complete the wizard.



In infopath you will find that there is now a datasource for the connection
that you created where you can find the value.



To set the text box value you can create a rule on tools -> form options ->
open and save -> rules where you can set the value of your text box to the
value in you other datasource.



Hope this helps.
 
E

E

Thanks Stephan for you thorough response.

We do not have the optioin to "include active row only". Is this an
Infopath 2007 feature? We are using Infopath 2003.

Is there a way to get it to work in 2003?

E

***
 
S

SSA

You can also do it programmatically in InfoPath 2003 (using managed code).
Read the ID column from the SharePoint list and set the value of your form
field. I can give you the code for the InfoPath 2007 if you want. I had the
code for the 2003 as well but lost it during a server crash.
 
S

Stephan van Eeden

Hi there

Its a pleasure!

I am quite new to SharePoint and InfoPath and don't know InfoPath 2003 at
all.
Hope you will come right with the code that SSA will provide.

Stephan
 
E

E

That would be great to see the code. Thank you.

SSA said:
You can also do it programmatically in InfoPath 2003 (using managed code).
Read the ID column from the SharePoint list and set the value of your form
field. I can give you the code for the InfoPath 2007 if you want. I had the
code for the 2003 as well but lost it during a server crash.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top