Share via


Is there a maximum ID that a SharePoint list item can be assigned?

Question

Wednesday, October 10, 2012 12:48 PM

Hi, I figured I'd start using this forum as it's been a great help to me so far! Thanks everyone!

The following is my scenario:

In a SharePoint 2007 environment, we have an empty SharePoint list. There has been a need to auto sync this list with a csv file. The csv file will consist of around 11 000 lines/rows.

Programmatically I'm able to clear the list, and update it. The reason for the clear, is that there may be rows removed from the csv. I figured it would be much easier to delete all the list items than going through each one one by one determining which have been removed.

Herewith lies my possible problem. Assuming my program should run everyday, 11 000 new items would be created everyday. This would mean after 1 week, SharePoint would be creating list items with ID's of 55 000.

Therefore I was just wondering... Is there an incremental ID number limit that SharePoint may assign new list items??

Thanks in advance,

Sean

All replies (3)

Wednesday, October 10, 2012 1:37 PM âś…Answered | 2 votes

The ListItemId property is an Int32, so it will go up to 2,147,483,647.  I've seen some discussions stating this would be the limit of your list storage, but have never tried to reach that number.  Plus, since you would not actually have that many items, just the IDs, I can't say what would happen.

That being said, you could save the list as a template and recreate it each time your IDs get too high.

Brandon Atkinson
Blog: http://brandonatkinson.blogspot.com


Wednesday, October 10, 2012 1:51 PM

Great! My question should rather have been what data type it is and you've answered it. If that's the limit, and I'll be updating the list everyday, it should be fine for another 500 years!

I thought about the idea of recreating the list using a template to "refresh" those ID's, though I don't think it will work in my scenario since the main face of this list will be a data view web part ... which means new a list GUID? Which means broken web part?

Though you're right about at some stage if need be having to recreate the list (and therefore the web part) if it gets out of hand.

Thanks a lot! I was just worried I might run into problems a year down the line.

May your PC's be fast and your restarts few.


Wednesday, October 7, 2015 12:10 PM

Its works fine .I did programatically in SPSevices. $(document).ready(function() {

var idquery=""; 
$().SPServices({
 operation: "GetListItems", 
async: false, 
listName: "test", 
CAMLQuery: idquery, 
CAMLRowLimit: 1, 
completefunc: function (xData, Status) 
{ 
$(xData.responseXML).SPFilterNode("z:row").each(function() { //alert($(this).attr("ows_Title")); 
var getvalue= parseInt($(this).attr("ows_Title"))+1;//Auto increment value $("input[title='TicketNumber']").val(getvalue);

        });
     } 
    });

1.get value one variable parseInt($(this).attr("ows_Title"))+1;
2.bind text box "TICKET Number"

More Details

[email protected]