Timeline for Programmatically sorting attribute table, adding field and sequentially numbering field based on that sort?
Current License: CC BY-SA 3.0
5 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jan 25, 2017 at 18:13 | comment | added | klewis | Sorting the table view in ArcMap is not permanent. I ran the Sort Tool, on a Date field, then ran the autoIncrement() function. The new Sequential ID's exactly match the ObjectID. It seems easier to Calculate the Sequential ID from ObjectID, after the Sort Tool. The Python autoIncrement function is worth saving for other problems too. | |
Jan 25, 2017 at 16:32 | comment | added | gnarkilleptic | I realize that Arc creates an OID field for giving features a unique identifier. This does not relate to my issue as I was working on creating a new sequentially numbered field based on a timestamp. I got this to work in ModelBuilder. If you sorted the attribute table in ArcMap itself and ran the script, It would not order the new field based on that sort. | |
Dec 20, 2016 at 19:34 | history | edited | PolyGeo♦ | CC BY-SA 3.0 |
deleted 2 characters in body
|
Dec 20, 2016 at 16:36 | comment | added | klewis | You don't need ModelBuilder to run the Sort tool. Sort creates a new data layer with the data ordered appropriately. With Filegeodatabase and Shapefile types you always have a sequential number, managed by the system, it is named Objectid or FID. | |
Dec 20, 2016 at 14:31 | history | answered | gnarkilleptic | CC BY-SA 3.0 |