| 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 |
|
|
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 |
|
|
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 |
|
|
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 |
|
|
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 |
|
 |
|
|
|
|