<?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 Trouble getting Field Calculator Processor to calculate new field in ArcGIS GeoEvent Server Questions</title>
    <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/trouble-getting-field-calculator-processor-to/m-p/1152293#M3732</link>
    <description>&lt;P&gt;We are trying to use a Field Calculator Processor to create a new ID field that concatenates a simple 2 character text string with a string version of the ObjectID field. The idea is that this new ID field would look something like&lt;/P&gt;&lt;LI-CODE lang="markdown"&gt;XX125​&lt;/LI-CODE&gt;&lt;P&gt;where 'XX' is the string and '125' is the ObjectID value.&lt;/P&gt;&lt;P&gt;To achieve this in ArcGIS Pro, we used the Calculate Field tool with this Python 3 expression:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;'XX'+str(!objectid!)&lt;/LI-CODE&gt;&lt;P&gt;The goal is to have the Field Calculator processor generate this value for new submissions to a dataset as they pass through GeoEvent, which is calculating some other fields as well.&lt;/P&gt;&lt;P&gt;Here are the Expressions we've tried in the Field Calculator processor. In GeoEvent the objectID field is interpreted as an integer.&lt;/P&gt;&lt;LI-CODE lang="markdown"&gt;'XX'+toString(objectid)
'XX'+objectid
concat('XX', toString(objectid))
concat('XX', objectid)​&lt;/LI-CODE&gt;&lt;P&gt;We've also tried setting up Field Mapper processors on either side of the Field Calculator processor to change the ObjectID field from an integer to a string type, then tried both of the expressions here:&lt;/P&gt;&lt;LI-CODE lang="markdown"&gt;'XX'+objectid
concat('XX', objectid)&lt;/LI-CODE&gt;&lt;P&gt;It is unclear to me why neither of these methods (or any of the expressions listed) are working, has anyone else had similar trouble or know what might be wrong?&lt;/P&gt;&lt;P&gt;(We're running ArcGIS Enterprise (including GeoEvent Server) 10.7.1 on Linux)&lt;/P&gt;</description>
    <pubDate>Wed, 09 Mar 2022 19:31:17 GMT</pubDate>
    <dc:creator>AbigailStephens</dc:creator>
    <dc:date>2022-03-09T19:31:17Z</dc:date>
    <item>
      <title>Trouble getting Field Calculator Processor to calculate new field</title>
      <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/trouble-getting-field-calculator-processor-to/m-p/1152293#M3732</link>
      <description>&lt;P&gt;We are trying to use a Field Calculator Processor to create a new ID field that concatenates a simple 2 character text string with a string version of the ObjectID field. The idea is that this new ID field would look something like&lt;/P&gt;&lt;LI-CODE lang="markdown"&gt;XX125​&lt;/LI-CODE&gt;&lt;P&gt;where 'XX' is the string and '125' is the ObjectID value.&lt;/P&gt;&lt;P&gt;To achieve this in ArcGIS Pro, we used the Calculate Field tool with this Python 3 expression:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;'XX'+str(!objectid!)&lt;/LI-CODE&gt;&lt;P&gt;The goal is to have the Field Calculator processor generate this value for new submissions to a dataset as they pass through GeoEvent, which is calculating some other fields as well.&lt;/P&gt;&lt;P&gt;Here are the Expressions we've tried in the Field Calculator processor. In GeoEvent the objectID field is interpreted as an integer.&lt;/P&gt;&lt;LI-CODE lang="markdown"&gt;'XX'+toString(objectid)
'XX'+objectid
concat('XX', toString(objectid))
concat('XX', objectid)​&lt;/LI-CODE&gt;&lt;P&gt;We've also tried setting up Field Mapper processors on either side of the Field Calculator processor to change the ObjectID field from an integer to a string type, then tried both of the expressions here:&lt;/P&gt;&lt;LI-CODE lang="markdown"&gt;'XX'+objectid
concat('XX', objectid)&lt;/LI-CODE&gt;&lt;P&gt;It is unclear to me why neither of these methods (or any of the expressions listed) are working, has anyone else had similar trouble or know what might be wrong?&lt;/P&gt;&lt;P&gt;(We're running ArcGIS Enterprise (including GeoEvent Server) 10.7.1 on Linux)&lt;/P&gt;</description>
      <pubDate>Wed, 09 Mar 2022 19:31:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geoevent-server-questions/trouble-getting-field-calculator-processor-to/m-p/1152293#M3732</guid>
      <dc:creator>AbigailStephens</dc:creator>
      <dc:date>2022-03-09T19:31:17Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble getting Field Calculator Processor to calculate new field</title>
      <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/trouble-getting-field-calculator-processor-to/m-p/1152329#M3733</link>
      <description>&lt;P&gt;Odd. But maybe this is a clue:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="KimGarbade_0-1646858425179.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/35986i3AB945D86D50F4A9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="KimGarbade_0-1646858425179.png" alt="KimGarbade_0-1646858425179.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;So maybe something like:&amp;nbsp;&lt;/P&gt;&lt;P&gt;concat('XX',valueOf(ObjectID))&amp;nbsp;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;concat('XX',Trim(valueOf(ObjectID)))&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;'XX' + valueOf(ObjectID)&lt;/P&gt;&lt;P&gt;Even though it says on the same page that "&lt;SPAN&gt;The toString( ) and valueOf( ) functions wrap identical implementations."&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Mar 2022 20:50:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geoevent-server-questions/trouble-getting-field-calculator-processor-to/m-p/1152329#M3733</guid>
      <dc:creator>KimberlyGarbade</dc:creator>
      <dc:date>2022-03-09T20:50:21Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble getting Field Calculator Processor to calculate new field</title>
      <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/trouble-getting-field-calculator-processor-to/m-p/1152516#M3734</link>
      <description>&lt;P&gt;I did not notice that while scouring the page - thanks &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/119500"&gt;@KimberlyGarbade&lt;/a&gt; ! I will update that and try the valueOf function instead today!&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2022 12:22:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geoevent-server-questions/trouble-getting-field-calculator-processor-to/m-p/1152516#M3734</guid>
      <dc:creator>AbigailStephens</dc:creator>
      <dc:date>2022-03-10T12:22:28Z</dc:date>
    </item>
  </channel>
</rss>

