AnsweredAssumed Answered

Problems with order in Transpose Fields

Question asked by AIRO_MU on Sep 8, 2016
Latest reply on Sep 12, 2016 by Dan_Patterson

As part of the development of a new GeoProcessing tool (in 10.3) I am using the Transpose Fields (arcpy.TransposeFields_management) in a small python script to transpose a horizontal line of data in a table to a vertical line. While the code works and takes the data I require and adds it to the new tables it does not seem to place the data in the correct order. 


Has anyone come across any issues like this with Transpose Fields or am I doing something wrong in the code?


See code (name of the field in the original table and the new name in PopSummaryT i.e Sum_Pop_T11 TotalPopulation) and image of output below: You will see that the order is different in the Table as set out in the code. 


arcpy.TransposeFields_management("PopSummary", "Sum_Pop_T11 TotalPopulation;Sum_Pop_014T11 Pop014;Sum_Pop_1524T1 Pop1524;Sum_Pop_2544T1 Pop2544;Sum_Pop_4564T1 Pop4564;Sum_Pop_65pT11 Pop65p", "PopSummaryT", "Indicator", "Census2011", "")



Another interesting point is that if I delete one or two of fields from the code then the order in the table is different again. 


Not sure what is happening here but if someone has any advice it would be great.