How do I use auto-number generation when submitting to share
Windows Server Forum Index Windows Server
Server discussion on Windows platform.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web winserverhelp.com
How do I use auto-number generation when submitting to share

 
Post new topic   Reply to topic    Windows Server Forum Index -> Portal Server Development
Author Message
PBS
Guest





Posted: Wed Jan 05, 2005 6:55 am    Post subject: How do I use auto-number generation when submitting to share Reply with quote

I created an Employee Requisition form (using Infopath & VS) which submits
data to a sharepoint library. How do I add a unique ID (auto-number) like
2001, 2002, etc. for the Employee Requisition forms created.
Back to top
Marco
Guest





Posted: Wed Jan 05, 2005 3:23 pm    Post subject: RE: How do I use auto-number generation when submitting to s Reply with quote

The way to do this is to add an event handler to the library. The event
handler can insert a new id into a custom id field when a form is added.

You could also consider just using the id that is generated by the library
which is also an autonumber.

Marco

"PBS" wrote:

Quote:
I created an Employee Requisition form (using Infopath & VS) which submits
data to a sharepoint library. How do I add a unique ID (auto-number) like
2001, 2002, etc. for the Employee Requisition forms created.
Back to top
PBS
Guest





Posted: Wed Jan 05, 2005 10:55 pm    Post subject: RE: How do I use auto-number generation when submitting to s Reply with quote

Thanks Marco. I just started working on a project with no prior experience
nor knowledge of Sharepoint. So, if you don't mind, can you please help me
with the event handler coding. Much appreciated.
Geetha

"Marco" wrote:

Quote:
The way to do this is to add an event handler to the library. The event
handler can insert a new id into a custom id field when a form is added.

You could also consider just using the id that is generated by the library
which is also an autonumber.

Marco

"PBS" wrote:

I created an Employee Requisition form (using Infopath & VS) which submits
data to a sharepoint library. How do I add a unique ID (auto-number) like
2001, 2002, etc. for the Employee Requisition forms created.
Back to top
Marco
Guest





Posted: Thu Jan 06, 2005 3:55 pm    Post subject: RE: How do I use auto-number generation when submitting to s Reply with quote

I am not having to much time, but hopefully this will get you started.

First there is this artcile on Event handlers
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/spptsdk/html/tsptDocLibEvents.asp

You can use the example for the versioning, but where it is replacing the
versioning you could use something like.

SPListItem listItem = file.Item;

listItem["Your custom id filed"] = Some auto number;
listItem.Update();

You have to figure out how to generate the autonumber. Hope that this gets
you started.

If you have any detailed questions you can also e-mail me direct.

Marco

"PBS" wrote:

Quote:
Thanks Marco. I just started working on a project with no prior experience
nor knowledge of Sharepoint. So, if you don't mind, can you please help me
with the event handler coding. Much appreciated.
Geetha

"Marco" wrote:

The way to do this is to add an event handler to the library. The event
handler can insert a new id into a custom id field when a form is added.

You could also consider just using the id that is generated by the library
which is also an autonumber.

Marco

"PBS" wrote:

I created an Employee Requisition form (using Infopath & VS) which submits
data to a sharepoint library. How do I add a unique ID (auto-number) like
2001, 2002, etc. for the Employee Requisition forms created.
Back to top
 
Post new topic   Reply to topic    Windows Server Forum Index -> Portal Server Development All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




New Topics Powered by phpBB