Hi!
This can be achieved using the ArcGIS API for Python.
If you access your AGOL Account/Enterprise Portal from ArcGIS Online Assistant https://ago-assistant.esri.com/ you can view the structure of the popup info for your Map and Feature Service items.
If you look at the "Data" section for a map or feature service (with popups enabled) in AGO Assistant, you can see the structure of popup information as JSON. In particular, what you're after is the "digitSeparator" parameter (true/false).
Here's an example JSON for the data section of a map or feature service item:
{
"layers": [
{
"id": 0,
"popupInfo": {
"title": "Contours",
"fieldInfos": [],
"description": null,
"showAttachments": true,
"mediaInfos": []
}
},
{
"id": 1,
"popupInfo": {
"title": "Contours 0.25 m: {ELEVATION}",
"fieldInfos": [
{
"fieldName": "OBJECTID",
"label": "Object ID",
"tooltip": "",
"visible": false,
"stringFieldOption": "textbox"
},
{
"fieldName": "ELEVATION",
"label": "Elevation (m) AHD",
"tooltip": "",
"visible": true,
"stringFieldOption": "textbox",
"format": {
"places": 2,
"digitSeparator": true
}
},
{
"fieldName": "CLASSIFICATION",
"label": "Classification",
"tooltip": "",
"visible": true,
"stringFieldOption": "textbox",
"format": {
"places": 2,
"digitSeparator": false
}
},
{
"fieldName": "SHAPE",
"label": "Shape",
"tooltip": "",
"visible": false,
"stringFieldOption": "textbox"
}
],
"description": null,
"showAttachments": true,
"mediaInfos": []
},
"layerDefinition": {
"defaultVisibility": true
}
},
{
"id": 2,
"popupInfo": {
"title": "Contours 5m: {ELEVATION}",
"fieldInfos": [
{
"fieldName": "OBJECTID",
"label": "Object ID",
"tooltip": "",
"visible": false,
"stringFieldOption": "textbox"
},
{
"fieldName": "ELEVATION",
"label": "Elevation (m) AHD",
"tooltip": "",
"visible": true,
"stringFieldOption": "textbox",
"format": {
"places": 2,
"digitSeparator": true
}
},
{
"fieldName": "CLASSIFICATION",
"label": "Classification",
"tooltip": "",
"visible": true,
"stringFieldOption": "textbox",
"format": {
"places": 2,
"digitSeparator": true
}
},
{
"fieldName": "SHAPE",
"label": "Shape",
"tooltip": "",
"visible": false,
"stringFieldOption": "textbox"
},
{
"fieldName": "SHAPE_STLength__",
"label": "SHAPE.STLength()",
"tooltip": "",
"visible": false,
"stringFieldOption": "textbox",
"format": {
"places": 2,
"digitSeparator": true
}
}
],
"description": null,
"showAttachments": true,
"mediaInfos": []
}
},
]
}
To access this via the api: First you can access the item through gis.content.get with the item ID.
Once you've got the item, use the get_data method https://developers.arcgis.com/python/api-reference/arcgis.gis.toc.html?highlight=get_data#arcgis.gis... to download the JSON data above.
Once you've got a copy of this data, you can iterate through the layers to programmatically change the value for "digitSeparator".
Lastly, you can update the item through the item.update method. This will push the changes back up into the map/feature service item.
While I don't have a snippet available off the top of my head, I've used this process numerous times to update/migrate popup data.