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 ?
-
There is a ID column which get auto incremented by 1. Why don't you use that? – P S Apr 01 '16 at 09:41
-
Because, I do not know how to use it. – Goshky Apr 01 '16 at 09:52
4 Answers
Best is that use ID column. It is not possible with only calculated column option. You have to set workflow for auto increment value.
- 1,659
- 1
- 13
- 26
-
-
Just add ID column in list view. Go to Modify view >> Checked ID column from columns section and save it. You can visible ID column in list. – Viraj Gorajia Apr 01 '16 at 10:00
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!
- 21,176
- 7
- 35
- 79
- 246
- 1
- 6
-
-
-
-
-
yes, and it must be a calculated colomn Option as was stated in your question. – Raoul Mensink Apr 01 '16 at 10:48
-
1Do 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
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!
- 957
- 1
- 11
- 24
- 3,369
- 1
- 16
- 24
