The Arcade snippet “return count($layer) + 1;” successfully auto-incremented plot IDs until a polygon feature was added to my layer far outside the usual area of interest. This distant polygon legitimately belongs in the layer, and yet it does not need to be included in the offline map area (doing so would create an excessively-long offline area). Unfortunately, current Field Maps functionality is that the count() function only considers features within an offline map area. This forces the user to make the offline map area large enough to encompass all features, and there are use cases where this is not desirable or feasible (such as mine).
Could we not store information about the parent layer, such as total # features, within offline map areas, so that Arcade functions like count() can always work regardless of the size of the offline map area.
Currently, my Arcade snippet needs to be “return count($layer) + 2;” in order to work. While technically this is a legitimate workaround, it leaves me open to errors in future when team members may add more polygons outside the offline map area (perhaps in an online web map) thereby rendering the code erroneous and requiring another hack.