Error Message
Attempts to display and edit feature layers in the ArcGIS Field Maps mobile app fail, and the error message below is returned in the exported error log file after selecting Share Error.
Error:
Domain: com.esri.arcgis.runtime.error
Code: 21
Description: Invalid JSON.
Cause
The web map contains a feature layer with an unsupported field type. ArcGIS Field Maps does not currently support the DateOnly, TimeOnly, and Timestampoffset field types.
Solution or Workaround
Remove the unsupported field type from the hosted feature layer in ArcGIS Online
In this workaround, unsupported field types are removed from the attribute table of the hosted feature layer in ArcGIS Online. In this example, the DateOnly field type is removed.
- In ArcGIS Online, click the hosted feature layer. On the item details page, click theĀ Data tab.
- In the Table view, delete the unsupported field type. Refer to ArcGIS Online: Delete a field for instructions.
The image below shows the DateOnly field removed from the feature layer in ArcGIS Online.
Transfer the field values of the unsupported field type to another field in ArcGIS Pro
In this workaround, field values from the unsupported field type are copied and transferred to a supported field type to ensure the field values are retained in ArcGIS Pro. The field with the unsupported field type from the feature layer is removed before republishing to ArcGIS Online for use in ArcGIS Field Maps.
- Open the ArcGIS Pro project containing the feature layer.
- Create a date field to store the dates. In this example, the new field is named Date_T.
- In the Contents pane, right-click the feature layer and click Attribute Table.
- In the attribute table, right-click the newly created field, and click Calculate Field. In this example, the Date_T field is selected.
- In the Calculate Field window, specify the following parameters:
- For Input Table, ensure the layer selected in Step 3 is prefilled. In this example, the input table is Test.
- For Field Name, ensure the field selected in Step 4 is prefilled. In this example, the field name is Date_T.
- For Expression Type, select Python.
- For Expression, under Fields, double-click the field with the attribute data to be transferred to the Date_T field. In this example, the existing field with the DateOnly data type is Date_O. The expression is populated as follows:
Date_T = !<Date_O>!
- Click Verify to validate the expression.
- Click OK to run the script.
- In the attribute table, right-click the unsupported field type name and select Delete.
- Share the feature layer as a web layer to ArcGIS Online for use in ArcGIS Field Maps. Refer to ArcGIS Pro: Share a web feature layer using the default configuration for instructions and more information.