Howdy folks:
I am working with ArcGIS Online and have imported a GeoJSON file we generated from some Drone metadata. One of the fields in the data is the mission date for the drone flight. This is stored in the GeoJSON file in the format: YYYYMMDD
For example: 20230612
When I create a Feature Layer from this GeoJSON file, the field is turned into an integer data type. When the data is displayed in a map, commas are inserted as if this were an integer.
For example: 20,230,612
When I look at the Fields display and click on this field I can see the Type: Integer. I can change the Field Value Type to Description or Name but that does not influence how the data is displayed.
Is there a way to edit the underlying data types of fields in the GeoJSON file?
Any other tricks I can try to get the data to display without the commas?
Thanks in advance for any suggestions.
Solved! Go to Solution.
You can create a new field of type string or date in your feature layer, then use calculate to populate the new field based on your integer values. I´m not familiar with the import GeoJSON workflow, I guess you would have noticed if you in that workflow could set the date field to string or date type instead of integer.
Here is where you add a field:
Click the field name and choose calculate:
If the integer type is okay you could also just choose to not show thousand separators in you pop-up. That you can configure in the web map from the fields symbol:
You would click Layers, then select your layer from the table of contents, and then the symbol you want will appear on the right hand side of the map.
You can create a new field of type string or date in your feature layer, then use calculate to populate the new field based on your integer values. I´m not familiar with the import GeoJSON workflow, I guess you would have noticed if you in that workflow could set the date field to string or date type instead of integer.
Here is where you add a field:
Click the field name and choose calculate:
If the integer type is okay you could also just choose to not show thousand separators in you pop-up. That you can configure in the web map from the fields symbol:
Thanks - these are really great tips. Too bad they don't have a TO_DATE function in Arcade or in SQL that will convert an integer to a Date. I suppose I could convert the integer to a String and then pick apart the year, month and day (using Left, Mid and Right functions) and then pass that to the DATE function.
For the display options you mentioned last, where would I navigate to to find those? In my map I only see icons for: Add, Layers, Tables, Basemap, Charts, Legend, Bookmarks, Save and Open, Map Properties, Share Map, etc.
You would click Layers, then select your layer from the table of contents, and then the symbol you want will appear on the right hand side of the map.
Thanks - now I see those other options. Very helpful!