<?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>topic Re: Decimals NOT being truncated/rounded in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/decimals-not-being-truncated-rounded/m-p/200300#M8891</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ensure you are working on a layer pointing to a Feature Class, &lt;STRONG&gt;not an Event Layer&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;What happens if you write a similar expression for Labeling as follows (Python Parser):&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM style="background-color: #fafafa; color: #4d4d4d;"&gt;round(float([POINT_X]), 6) + ", " +&amp;nbsp;round(float([POINT_Y]), 6)&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Oct 2017 20:32:48 GMT</pubDate>
    <dc:creator>JayantaPoddar</dc:creator>
    <dc:date>2017-10-25T20:32:48Z</dc:date>
    <item>
      <title>Decimals NOT being truncated/rounded</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/decimals-not-being-truncated-rounded/m-p/200295#M8886</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For points, I added some geometry fields (POINT_X and POINT_Y as automatically generated), which were created as Double type.&lt;/P&gt;&lt;P&gt;I want them to display as my label (e.g., "35.596821, -81.235600"). I went to the numeric formatting and changed to&amp;nbsp;6 as that's the number of decimal places I want.&lt;/P&gt;&lt;P&gt;For some (not all; most are fine), there is infinite repeat (e.g., "-81.39291999999999"). Here is my label code:&amp;nbsp;Round($feature.POINT_Y, 6) + ", " + Round($feature.POINT_X, 6)&lt;/P&gt;&lt;P&gt;I've played around with the field calculator, even trying to create new fields and convert to different types, but that's not working.&lt;/P&gt;&lt;P&gt;HELP!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Oct 2017 18:51:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/decimals-not-being-truncated-rounded/m-p/200295#M8886</guid>
      <dc:creator>deleted-user-LNABNwA5CZcD</dc:creator>
      <dc:date>2017-10-25T18:51:49Z</dc:date>
    </item>
    <item>
      <title>Re: Decimals NOT being truncated/rounded</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/decimals-not-being-truncated-rounded/m-p/200296#M8887</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you just need the field for labelling (that is another issue that can probably be solved directly)&lt;/P&gt;&lt;P&gt;I take it that is Arcade?&lt;/P&gt;&lt;P&gt;In python you can use the formatting characteristics builtin to convert a numeric value to string with complete control over the justification and number of decimals. &amp;nbsp;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="string token"&gt;"{:10.6f}"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;81.39291999999999&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="string token"&gt;'-81.392920'&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I am sure equivalent abilities exist in other labelling languages&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 09:58:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/decimals-not-being-truncated-rounded/m-p/200296#M8887</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2021-12-11T09:58:51Z</dc:date>
    </item>
    <item>
      <title>Re: Decimals NOT being truncated/rounded</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/decimals-not-being-truncated-rounded/m-p/200297#M8888</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tried this in Python for the label, and it didn't work. Not sure what I'm missing. Is that truly all (with POINT_X replacing 81.39291999999) that should be needed?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Oct 2017 20:11:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/decimals-not-being-truncated-rounded/m-p/200297#M8888</guid>
      <dc:creator>deleted-user-LNABNwA5CZcD</dc:creator>
      <dc:date>2017-10-25T20:11:52Z</dc:date>
    </item>
    <item>
      <title>Re: Decimals NOT being truncated/rounded</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/decimals-not-being-truncated-rounded/m-p/200298#M8889</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Add a text field, use that as the convertor .&amp;nbsp; The format conversion will perform if point_x is indeed a number, it should fail with an error otherwise.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you can replicate my example in your python IDE using python 3.5, then there is something wrong with the labelling&amp;nbsp;&lt;/P&gt;&lt;P&gt;My example is Python... make sure that you specify python if there is any other options&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Oct 2017 20:22:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/decimals-not-being-truncated-rounded/m-p/200298#M8889</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2017-10-25T20:22:02Z</dc:date>
    </item>
    <item>
      <title>Re: Decimals NOT being truncated/rounded</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/decimals-not-being-truncated-rounded/m-p/200299#M8890</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, figured it out just now. It was kind of backwards. I was able to go off the original Double field (POINT_X). In Python, and the decimal places and preserved characters were in opposite positions from what I thought:&lt;BR /&gt;'{:6.10}'.format([POINT_X])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Still seems inefficient, and something is off with the Round() function I'd still be curious to figure out, but at least it works. Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Oct 2017 20:25:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/decimals-not-being-truncated-rounded/m-p/200299#M8890</guid>
      <dc:creator>deleted-user-LNABNwA5CZcD</dc:creator>
      <dc:date>2017-10-25T20:25:54Z</dc:date>
    </item>
    <item>
      <title>Re: Decimals NOT being truncated/rounded</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/decimals-not-being-truncated-rounded/m-p/200300#M8891</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ensure you are working on a layer pointing to a Feature Class, &lt;STRONG&gt;not an Event Layer&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;What happens if you write a similar expression for Labeling as follows (Python Parser):&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM style="background-color: #fafafa; color: #4d4d4d;"&gt;round(float([POINT_X]), 6) + ", " +&amp;nbsp;round(float([POINT_Y]), 6)&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Oct 2017 20:32:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/decimals-not-being-truncated-rounded/m-p/200300#M8891</guid>
      <dc:creator>JayantaPoddar</dc:creator>
      <dc:date>2017-10-25T20:32:48Z</dc:date>
    </item>
    <item>
      <title>Re: Decimals NOT being truncated/rounded</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/decimals-not-being-truncated-rounded/m-p/200301#M8892</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have this problem and none of these solutions are working. I need the calculated number to be rounded. When I have tried to use the above solutions I keep getting this. This is causing a problem because this is how is is being displayed as well.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/tag/arcpro/tg-p"&gt;#arcpro&lt;/A&gt;‌ &lt;A href="https://community.esri.com/t5/tag/decimals/tg-p"&gt;#decimals&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/411212_Capture.JPG" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-2 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/411214_Capture1.JPG" /&gt;##&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jun 2018 15:48:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/decimals-not-being-truncated-rounded/m-p/200301#M8892</guid>
      <dc:creator>StayMappy</dc:creator>
      <dc:date>2018-06-12T15:48:29Z</dc:date>
    </item>
    <item>
      <title>Re: Decimals NOT being truncated/rounded</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/decimals-not-being-truncated-rounded/m-p/200302#M8893</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;it you calculate the values into a text field, as in my suggestion above, then you can control the output format easily&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jun 2018 15:58:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/decimals-not-being-truncated-rounded/m-p/200302#M8893</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-06-12T15:58:40Z</dc:date>
    </item>
    <item>
      <title>Re: Decimals NOT being truncated/rounded</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/decimals-not-being-truncated-rounded/m-p/200303#M8894</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is what happened when I tried your code&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/411215_Capture.JPG" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jun 2018 16:05:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/decimals-not-being-truncated-rounded/m-p/200303#M8894</guid>
      <dc:creator>StayMappy</dc:creator>
      <dc:date>2018-06-12T16:05:22Z</dc:date>
    </item>
    <item>
      <title>Re: Decimals NOT being truncated/rounded</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/decimals-not-being-truncated-rounded/m-p/200304#M8895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;is that a text field?&lt;/P&gt;&lt;P&gt;python parser in the field calculator&lt;/P&gt;&lt;P&gt;I just tried it&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;a &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;91.1234567890&lt;/SPAN&gt;
&lt;SPAN class="string token"&gt;"{:6.2f}"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;a&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="string token"&gt;' 91.12'&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 09:58:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/decimals-not-being-truncated-rounded/m-p/200304#M8895</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2021-12-11T09:58:54Z</dc:date>
    </item>
    <item>
      <title>Re: Decimals NOT being truncated/rounded</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/decimals-not-being-truncated-rounded/m-p/200305#M8896</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;These are floats.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jun 2018 16:16:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/decimals-not-being-truncated-rounded/m-p/200305#M8896</guid>
      <dc:creator>StayMappy</dc:creator>
      <dc:date>2018-06-12T16:16:45Z</dc:date>
    </item>
    <item>
      <title>Re: Decimals NOT being truncated/rounded</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/decimals-not-being-truncated-rounded/m-p/200306#M8897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if you want labels, then I always use a text field to ensure that I get what I want in terms of formatting.&lt;/P&gt;&lt;P&gt;The inputs can be numbers (float double etc) but python formatting handles the conversions clearly and concisely without messing around with the actual numbers.&lt;/P&gt;&lt;P&gt;In your case if floates are the inputs, the first number is the width of the resultant string and the second number is the number of required decimals&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jun 2018 16:22:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/decimals-not-being-truncated-rounded/m-p/200306#M8897</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-06-12T16:22:21Z</dc:date>
    </item>
    <item>
      <title>Re: Decimals NOT being truncated/rounded</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/decimals-not-being-truncated-rounded/m-p/200307#M8898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So I will probably have to make a new field that converts the float to string and then format? I need it initially in float because that field has to be calculating the acres of a polygon.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jun 2018 16:25:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/decimals-not-being-truncated-rounded/m-p/200307#M8898</guid>
      <dc:creator>StayMappy</dc:creator>
      <dc:date>2018-06-12T16:25:29Z</dc:date>
    </item>
    <item>
      <title>Re: Decimals NOT being truncated/rounded</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/decimals-not-being-truncated-rounded/m-p/200308#M8899</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE class="language-python line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="string token"&gt;"{:10.6f}"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;!YourNumberFieldNameHere!&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&amp;nbsp; &lt;SPAN class="comment token"&gt;# python, parser, calculate into a text field&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;try it... add the text field, set the parser, vary the numbers to suit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jun 2018 16:31:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/decimals-not-being-truncated-rounded/m-p/200308#M8899</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-06-12T16:31:18Z</dc:date>
    </item>
    <item>
      <title>Re: Decimals NOT being truncated/rounded</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/decimals-not-being-truncated-rounded/m-p/200309#M8900</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This works. Thanks for all the help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jun 2018 17:33:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/decimals-not-being-truncated-rounded/m-p/200309#M8900</guid>
      <dc:creator>StayMappy</dc:creator>
      <dc:date>2018-06-12T17:33:02Z</dc:date>
    </item>
    <item>
      <title>Re: Decimals NOT being truncated/rounded</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/decimals-not-being-truncated-rounded/m-p/200310#M8901</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;glad it worked Jessica&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jun 2018 23:43:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/decimals-not-being-truncated-rounded/m-p/200310#M8901</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-06-12T23:43:29Z</dc:date>
    </item>
  </channel>
</rss>

