• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 596
  • Last Modified:

Calculate the next largest number for column in a sharepoint list.

I have a column in a list titled "Item number".  Each time I add a new item to the list I would like to have that field automatically populated wih the next largest number calculated by looking at all other numbers in that column.  For example if the last item added to the lst had 100 in the field "Item number" the next time I add an item, the "Item number" should be automatically generated as 101.  I have tried using the calculated value column type but the function I've tried (see code below) does not work.  Any help would be greatly appreciated.
=max[Item number]+1

Open in new window

1 Solution
You can't use the MAX function to compare the same column value between different items. You can only use it for different column values for the same item.
You will have to create an event handler (using code) which does the comparison and produces the result you want.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now