Is there a way to add the length of an already collected line to it's attribute table? I know there is a measure tool, but I want to know the length of a collected line without having to do another step.
At the moment, Collector does not auto-populate the Shape_Length column of a line feature service. I did some digging to find out why, and in one of our prior support cases it's mentioned that this is by default. Here was the reasoning behind that:
This behavior is expected behavior as feature services are editable - if the shape and length geometries were editable they could be potentially altered and cause integrity issues with geometry of the features and their associated geometry tables.
Upon thinking about this, while this may not make much of an issue for some feature services, asking the feature service to recalculate shape lengths and areas upon editing would likely introduce significant performance issues. I'm certainly not on the development team, but I believe that's likely why this is by design at the moment.
While it's not ideal, the quickest and easiest way to populate a column with the current (non-dynamic) line length would be to:
1. Temporarily turn off editor tracking and syncing capabilities
2. Go into the Data tab or add the layer to a web map and open the attribute table
3. Add a field for your lengths
4. Field calculate using Arcade and enter "Length($feature,'<Units')" without quotes. Arcade isn't available unless you've followed step 1.
5. Then you can re-enable editor tracking and syncing capabilities.
For more information on this Arcade expression, check out: Geometry Functions | ArcGIS for Developers
Esri Support Services
Retrieving data ...