<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>idea Allow for control of numeric format in Python stand-alone script in Python Ideas</title>
    <link>https://community.esri.com/t5/python-ideas/allow-for-control-of-numeric-format-in-python/idi-p/1545154</link>
    <description>&lt;P&gt;ESRI should really offer a way to control numeric format (thousand separator, number of decimal, etc.) for DOUBLE, FLOAT, LONG and SHORT values using python stand-alone scripting (no manual manipulation in ArcGIS Pro needed). As of now, I have explored two options :&lt;/P&gt;&lt;P&gt;1. Specifying the scale of the field when creating a new field using the "AddField" function, but I found out that the "scale" and "precision" parameters are ignored when using on a feature class inside a geodatabase.&lt;/P&gt;&lt;P&gt;2. Using the layer CIM to access the numberFormat properties with the following script, but the fieldDescriptions list always return empty. After reading a bit on the problem, this seems more like a feature than a bug (eventhough I don't get why we cannot acces the list in a python script, bu we can in the python command promt, inside ArcGIS Pro).&lt;/P&gt;&lt;PRE&gt;aprx_path = [PATH_TO_APRX]
aprx = arcpy.mp.ArcGISProject(aprx_path)
map = aprx.listMaps()[0]
lyr = map.listLayers("MyLayer")[0]

lyr_cim = lyr.getDefinition('V3')

for fd in lyr_cim.featureTable.fieldDescriptions:
    fdNumFmt = fd.numberFormat
    fdNumFmt.useSeparator = True
    fdNumFmt.roundingValue = 2&lt;/PRE&gt;&lt;P&gt;Please, consider upvoting this idea!&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Thu, 03 Oct 2024 13:04:25 GMT</pubDate>
    <dc:creator>AntoinePrince1805</dc:creator>
    <dc:date>2024-10-03T13:04:25Z</dc:date>
    <item>
      <title>Allow for control of numeric format in Python stand-alone script</title>
      <link>https://community.esri.com/t5/python-ideas/allow-for-control-of-numeric-format-in-python/idi-p/1545154</link>
      <description>&lt;P&gt;ESRI should really offer a way to control numeric format (thousand separator, number of decimal, etc.) for DOUBLE, FLOAT, LONG and SHORT values using python stand-alone scripting (no manual manipulation in ArcGIS Pro needed). As of now, I have explored two options :&lt;/P&gt;&lt;P&gt;1. Specifying the scale of the field when creating a new field using the "AddField" function, but I found out that the "scale" and "precision" parameters are ignored when using on a feature class inside a geodatabase.&lt;/P&gt;&lt;P&gt;2. Using the layer CIM to access the numberFormat properties with the following script, but the fieldDescriptions list always return empty. After reading a bit on the problem, this seems more like a feature than a bug (eventhough I don't get why we cannot acces the list in a python script, bu we can in the python command promt, inside ArcGIS Pro).&lt;/P&gt;&lt;PRE&gt;aprx_path = [PATH_TO_APRX]
aprx = arcpy.mp.ArcGISProject(aprx_path)
map = aprx.listMaps()[0]
lyr = map.listLayers("MyLayer")[0]

lyr_cim = lyr.getDefinition('V3')

for fd in lyr_cim.featureTable.fieldDescriptions:
    fdNumFmt = fd.numberFormat
    fdNumFmt.useSeparator = True
    fdNumFmt.roundingValue = 2&lt;/PRE&gt;&lt;P&gt;Please, consider upvoting this idea!&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 03 Oct 2024 13:04:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-ideas/allow-for-control-of-numeric-format-in-python/idi-p/1545154</guid>
      <dc:creator>AntoinePrince1805</dc:creator>
      <dc:date>2024-10-03T13:04:25Z</dc:date>
    </item>
    <item>
      <title>Re: Allow for control of numeric format in Python stand-alone script - Status changed to: Needs Clarification</title>
      <link>https://community.esri.com/t5/python-ideas/allow-for-control-of-numeric-format-in-python/idc-p/1568910#M405</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/699545"&gt;@AntoinePrince1805&lt;/a&gt;&amp;nbsp;, would you be able to provide more details on what your idea is suggesting? It sounds like the idea is to support filed scale/precision in file geodatabases so that you can specify these when using AddField?&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2024 15:58:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-ideas/allow-for-control-of-numeric-format-in-python/idc-p/1568910#M405</guid>
      <dc:creator>HannesZiegler</dc:creator>
      <dc:date>2024-12-16T15:58:01Z</dc:date>
    </item>
  </channel>
</rss>

