Hi all, I'm using ArcGIS Online and I'm wondering if there is a way to rearrange the fields of a hosted layer file. I know you can change their order and if they're displayed or not when configuring layer attributes in a Web Map, but I'm curious if there is a way to change them in the Hosted layer file itself so that the order is reflected when the layer is imported into another map. So far I've had to reorder the fields every time I start a new map and it's become really time consuming. Any hints would be appreciated. Thanks!
Not sure if this helps anyone, but using ago assistant, you can edit the JSON to rearrange the fields then save your change. I have done it with views, because you cant rearrange fields even there. So editing the JSON helped out. Just make sure you are careful when editing with the brackets and commas.
Can you please post instructions for your method (in simple enough terms for someone who doesn't know what JSON stands for)? Thank you!
I just tried this, rearranged the order of the fields within the JSON but it didn't change the order of anything within feature editing fields in my AGOL map. You are saying that it worked for you?
Can you please post instructions for your method (in simple enough terms for someone who doesn't know what JSON stands for)? Thank you!
Not sure if this will work for everyone but for my application I was able to solve this problem by exporting my data layer as a FGDB from AGOL, import it into Arc Pro, edit the attribute table within ArcPro and then export it back out as a new web layer and reupload it to my AGOL map. I had to redo all of my symbology and what not but I was at least able to reorder my features and now I know not to screw it up again!
Re-order your fields in ArcGIS Online by configuring visualization of the layer
Note: while this does not change the actual field order in the data store that ArcGIS Online loads the data from, it does change the order of the fields for the table and popup for the layer.
Method using the ArcGIS Online interface
Note that we did not have to create, calculate, and delete any fields and we did not have to download and re-publish the data. We did not need to know python, JSON, or REST end points.
You can do this stuff via the ArcGIS Assistant and/or the ArcGIS API for Python and/or REST endpoints, and if you have that skillset, excellent! Sometimes I do field re-ordering as listed above, sometimes with the ArcGIS API for Python, and sometimes with the AGO Assistant - depending on how much there is to do.
The ArcGIS Assistant is a fantastic tool, but you do need to be careful. I recommend copying the existing data configuration ( @AYamaguchi_UGRWCD: this format is the JSON you were asking about) and saving it as a text file somewhere so that you can re-apply it if you make a mistake. Be careful, you can mess up your dataset with the programmatic methods, but not with the steps I outlined above. If you do mess up, you can re-apply the last working copy if you saved the JSON to a text file.