Attribute fields out of order

11-23-2020 06:14 PM
New Contributor III

Hi there, We have a survey built using the online survey design builder. It was built over two years ago and functions well, though we have noticed that the order of questions as they are asked/designed in the survey does not match the data output for the survey. For instance we have a Text field for First Name and then directly below we have a Text field for Last Name. These two attribute fields are not next to each other in the data output (there are numerous other examples like this). 

I'm suspecting this is happening because the survey has been modified since it was first created two years ago, but is there any way to get the attribute fields reorganized in the data output so they're more in line with the survey design?


0 Kudos
1 Reply
Esri Frequent Contributor

Hi Grace,

You are correct, what you are seeing is expected, the order of the fields in the AGO Data tab viewer, web map pop-up, or the Data tab of Survey123 website are based on the order of the fields in the underlying hosted feature layer. By default they are in the order they were created.

If you have modified the survey and added additional fields over time, they will simply be at the end of the table. You may be better to look into posts in the ArcGIS Online forums, as this is where the change needs to be made if possible. See for example of other users discussing this topic. Also refer to the documentation:

Another manual workaround I can think of is to create new fields in the correct order for every field currently in your table (make sure they are the same type and have same properties as each original field). Give them a different name (ie with 1 on the end) and then copy the data for each row into those new fields. Once all data is copied and verified in the new fields, delete all the old fields, and then rename the new fields back to the original names. Now, this comes with a huge warning, this is risky and could lead to data loss, so proceed with care. Ensure you have backup of all your data and you verify it before deleting the original fields as this can not be undone. Also note it could break any web maps, dashboards and other items you have that use this feature layer. From a Survey123 point of view, provided the field name is exactly the same as the question name, this approach will work.