2

I have a column with name "Title " and want to make my column be a auto increment (1, 1) with Calculated column option. How to do it ?

Mike
  • 12,186
  • 8
  • 41
  • 64
Goshky
  • 2,058
  • 4
  • 24
  • 48

4 Answers4

3

Best is that use ID column. It is not possible with only calculated column option. You have to set workflow for auto increment value.

Viraj Gorajia
  • 1,659
  • 1
  • 13
  • 26
1

It is possible with a Calculated Column,
but the Workflow method of incrementing is the best way to go.

If you can not do Workflows and are stuck to Calculated Columns then the full details are at:

Why you can not use [ID] : Calculated column with ID removes ID number on update

How to workaround it: Create unique number with ListItem [ID] and [Today] age in Calculated Column Formula

DISCLAIMER This is not for the faint of heart!

Danny '365CSI' Engelman
  • 21,176
  • 7
  • 35
  • 79
0

You can use the auto increment value from the id field and put it in the formula field:

[ID]

Place the id here

Raoul Mensink
  • 246
  • 1
  • 6
  • How to do it ? I'm a beginner with SP.. – Goshky Apr 01 '16 at 09:51
  • added an Image thats Shows where to place it. – Raoul Mensink Apr 01 '16 at 10:41
  • This is valid for SharePoint 2007 ? – Goshky Apr 01 '16 at 10:44
  • and column type must be a ? – Goshky Apr 01 '16 at 10:45
  • yes, and it must be a calculated colomn Option as was stated in your question. – Raoul Mensink Apr 01 '16 at 10:48
  • 1
    Do not use the ID field within a calculated field: - You will have trouble inserting a record. It will work well in the modification. - It is not officially supported by Microsoft – Juan Pablo Pussacq Laborde Apr 01 '16 at 12:23
  • do you have a reference link that you could provide to Support your claim? @jpussacq I have used this before and haven't had Problems with it – Raoul Mensink Apr 01 '16 at 12:28
  • No unfortunately it is not common functionality "unsupported" are published. But ID, as Today are not recommended use in calculated fields. That is the reason why not appear in the list of available fields. You will find many articles from people who have tried them. But it is not recommended. You can always run the risk, but it's never good to use functionality not supported. – Juan Pablo Pussacq Laborde Apr 01 '16 at 12:31
  • Some links with some explanations: http://stackoverflow.com/questions/28173805/sharepoint-2013-calculated-field-not-working-all-the-time and http://sharepoint.stackexchange.com/questions/22977/how-to-use-calculated-field-to-retrieve-the-id-of-the-item-in-the-sharepoint-200 – Juan Pablo Pussacq Laborde Apr 01 '16 at 12:36
0

Alternatives

1) Use ID

It is the best option because SharePoint ensures its uniqueness. But you can not apply business logic. It starts at 1 and increases by 1. You will have gaps when records are deleted.

2) Event handler

Create an event receiver to generate increased values according to the logic that you need. You need Visual Studio and C#.

3) Workflow

It can be an alternative. But workflows are not planning for it. The advantage is that you do not need to develop in C# as in option 2.

Important

Do not use the ID field within a calculated field: - You will have trouble inserting a record. It will work well in the modification. - It is not officially supported by Microsoft

If you need further assistance, please consult me. Greetings!

Nisarg Shah
  • 957
  • 1
  • 11
  • 24