Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Numbering List Item

Status
Not open for further replies.

vivasuzi

Programmer
Jun 14, 2002
183
0
0
I have a sharepoint list. I want to number each item and it seems the ID number does this for me. However, when I delete a list item, the rest of the numbers don't move up one. Instead that number is gone and sharepiont continues numbering new items.

So I want to know if you can create code to number each list item. The number for each item would be the same when it was filtered, but if an item is deleted I would be able to physically change the item numbers so that there isn't anything missing.

My boss is real big on keeping the numbers so that there aren't any spaces. Any ideas?

Example:
1 cars
2 puppies
3 cats
4 toys
5 bags

Delete #3 in sharepoint list gives me:
1 cars
2 puppies
4 toys
5 bags

I want it to do this (even if I have to manually change the numbers):
1 cars
2 puppies
3 toys
4 bags

Thanks for any help!!!

[cat2] *Suzanne* [elephant2]
[wavey] [wiggle]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top