0

Can you please let me know if it is possible to add a new Field between two existing field using ArcPy? For Example if I have "Name", "Area", fiels already in my shapefile can I add a new field called "Scope" between these two? so the table looks like "Name","Scope", "Area"

Thanks

2

You can't insert a field between two existing fields in a shapefile. you will have to create a whole new file and create it with the order that you want.

  • thanks Dan, but what do you mean by creating whole file? how can I do that? – user1106951 Dec 22 '13 at 2:06
  • It isn't that simple...you have to create a searchcursor, obtain the data from the fields that you want, order them in the order that you want then create an insertcursor putting the values where you want them. You might look to see if there are free tools out there that might do it. Check www.ian-ko.com and see if one of his toolsets allows for reordering fields. – user681 Dec 22 '13 at 2:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.