<?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: Concatenate GlobalID plus other field in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/concatenate-globalid-plus-other-field/m-p/1029989#M37829</link>
    <description>&lt;P&gt;concatenation requires that the destination field be text.&lt;/P&gt;&lt;P&gt;When concatenating numbers, they have to be converted to text&lt;/P&gt;&lt;P&gt;in python&lt;/P&gt;&lt;P&gt;str(1) + str(2)&amp;nbsp;&lt;/P&gt;&lt;P&gt;will yield 12&lt;/P&gt;&lt;P&gt;or use&lt;/P&gt;&lt;P&gt;"{}_{}".format(1, 2)&lt;/P&gt;&lt;P&gt;to get "1_2"&lt;/P&gt;</description>
    <pubDate>Wed, 24 Feb 2021 14:15:30 GMT</pubDate>
    <dc:creator>DanPatterson</dc:creator>
    <dc:date>2021-02-24T14:15:30Z</dc:date>
    <item>
      <title>Concatenate GlobalID plus other field</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/concatenate-globalid-plus-other-field/m-p/1029986#M37828</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;i'd like to know if its possible to concatenate an original GlobalID field with another numeric one.&lt;/P&gt;&lt;P&gt;I'm trying to create a field(COD_ID) that contain&amp;nbsp;&amp;nbsp;$feature.GlobalID + $feature.CODFAB = COD_ID&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks so much!&lt;/P&gt;&lt;P&gt;thai mota&lt;/P&gt;</description>
      <pubDate>Wed, 24 Feb 2021 14:01:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/concatenate-globalid-plus-other-field/m-p/1029986#M37828</guid>
      <dc:creator>thainamota</dc:creator>
      <dc:date>2021-02-24T14:01:45Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenate GlobalID plus other field</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/concatenate-globalid-plus-other-field/m-p/1029989#M37829</link>
      <description>&lt;P&gt;concatenation requires that the destination field be text.&lt;/P&gt;&lt;P&gt;When concatenating numbers, they have to be converted to text&lt;/P&gt;&lt;P&gt;in python&lt;/P&gt;&lt;P&gt;str(1) + str(2)&amp;nbsp;&lt;/P&gt;&lt;P&gt;will yield 12&lt;/P&gt;&lt;P&gt;or use&lt;/P&gt;&lt;P&gt;"{}_{}".format(1, 2)&lt;/P&gt;&lt;P&gt;to get "1_2"&lt;/P&gt;</description>
      <pubDate>Wed, 24 Feb 2021 14:15:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/concatenate-globalid-plus-other-field/m-p/1029989#M37829</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2021-02-24T14:15:30Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenate GlobalID plus other field</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/concatenate-globalid-plus-other-field/m-p/1030013#M37832</link>
      <description>&lt;P&gt;It looks like you may be doing this in Arcade.&amp;nbsp; Here is an attribute rule that I use to concatenate two fields in my streets feature class:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;// This rule will calculate the  alias name field by concatenating the an_name and an_postdir fields....

// Specify the fields to concatenate
var values = [$feature.AN_NAME, $feature.AN_POSTDIR]
var combined_value = [];

// Loop through the field values and test if they are null or empty strings
// If they are not null or empty add them to an array
for (var i in values) {
    var value = values[i];
    if (IsEmpty(value)) continue;
    combined_value[Count(combined_value)] = value
}

// Return the field values concatenated with a space between
return Concatenate(combined_value, " ");&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's always a good idea to test for empty or null value fields to avoid an errors when you least expect them.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Feb 2021 15:22:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/concatenate-globalid-plus-other-field/m-p/1030013#M37832</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2021-02-24T15:22:40Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenate GlobalID plus other field</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/concatenate-globalid-plus-other-field/m-p/1030412#M37889</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/53453"&gt;@thainamota&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Can you explain a little bit more about why you want to concatenate these values?&lt;/P&gt;&lt;P&gt;It is possible to concatenate a GUID and a text as shown in the simplified example below:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var globalid = Guid();
var sometext = "abc";
return Concatenate([globalid, sometext], ' ');&lt;/LI-CODE&gt;&lt;P&gt;This will return:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;{5429dd99-754a-4388-868a-c4436624b705} abc&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please take into account the comments by&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/3374"&gt;@JoeBorgione&lt;/a&gt;&amp;nbsp;about null values.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Feb 2021 13:40:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/concatenate-globalid-plus-other-field/m-p/1030412#M37889</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2021-02-25T13:40:36Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenate GlobalID plus other field</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/concatenate-globalid-plus-other-field/m-p/1031546#M37996</link>
      <description>&lt;P&gt;Hi guys thanks for yours answers&amp;nbsp; &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/215600"&gt;@DanPatterson&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/3374"&gt;@JoeBorgione&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/1108"&gt;@XanderBakker&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately what i’m trying to do became complicate. I’ll try explain&lt;BR /&gt;I want to create a concatenate field ( other 4 fields). Then, at the same introduce an attribute rule for each field&lt;BR /&gt;So, my feature has:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;cod_fab&amp;nbsp;&lt;/STRONG&gt; that is already compilate&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;cod_seq&amp;nbsp;&lt;/STRONG&gt; for what I do&amp;nbsp; calculate field&amp;nbsp;–&amp;gt; Sequential number from 10.000 interval 1&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;cod_alfa&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt; with two letters, the same for all records (calculate&amp;nbsp;field )&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;cod_unique&lt;/STRONG&gt; concatenate field (cod_fab + cod_alfa + cod_seq)&lt;/P&gt;&lt;P&gt;The attribute rules that I want to create for fields above is :&lt;/P&gt;&lt;P&gt;a. If &amp;nbsp;&lt;STRONG&gt;cod_fab&lt;/STRONG&gt; is null or zero return 00000&lt;BR /&gt;b. Nextsequencevalue, in &lt;STRONG&gt;cod_seq&lt;/STRONG&gt;, from 54.398&lt;BR /&gt;c. Compilate PP in &lt;STRONG&gt;cod_alfa&lt;/STRONG&gt; field&lt;BR /&gt;d. Concatenate in &lt;STRONG&gt;cod_unique&lt;/STRONG&gt;: &lt;STRONG&gt;cod_fab&lt;/STRONG&gt; (its numeric field - 5 digits), &lt;STRONG&gt;cod_alfa&lt;/STRONG&gt;(PP) e &lt;STRONG&gt;cod_seq&lt;/STRONG&gt;&lt;BR /&gt;The result should be something like that &lt;STRONG&gt;36049PP54394&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;My problems are:&lt;/P&gt;&lt;P&gt;1-create and run all these attribute rule&lt;/P&gt;&lt;P&gt;2- Implement all these attribute rules in feature that has more than 44.400 geometries&lt;/P&gt;&lt;P&gt;3 - Some records have cod_fab zero, so I try to put 00000 in cod_unique to complete the field.&lt;/P&gt;&lt;P&gt;Yours advices will be very very welcome !!&lt;/P&gt;&lt;P&gt;Thanks and sorry for delay (in the last hours I try to do alone with many errors and no success)&lt;/P&gt;&lt;P&gt;thaina mota&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cattura.PNG" style="width: 671px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/7192i975C1D7FA701FCC7/image-size/large?v=v2&amp;amp;px=999" role="button" title="Cattura.PNG" alt="Cattura.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Mar 2021 16:33:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/concatenate-globalid-plus-other-field/m-p/1031546#M37996</guid>
      <dc:creator>thainamota</dc:creator>
      <dc:date>2021-03-01T16:33:51Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenate GlobalID plus other field</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/concatenate-globalid-plus-other-field/m-p/1031573#M37999</link>
      <description>&lt;P&gt;So we are not dealing with an actual global id field anymore?&lt;/P&gt;&lt;P&gt;You mention that you want an attribute rule for each field. When do you want these rules to fire?&amp;nbsp; Are you adding new features to this layer, or do you want to validate the existing values and update them?&amp;nbsp; Depending what you are doing, I suggest you take a look at the &lt;A href="https://pro.arcgis.com/en/pro-app/latest/help/data/geodatabases/overview/an-overview-of-attribute-rules.htm" target="_self"&gt;online help&lt;/A&gt; that describes the difference between &lt;A href="https://pro.arcgis.com/en/pro-app/latest/help/data/geodatabases/overview/calculation-attribute-rules.htm#GUID-4E18C976-36C0-433C-884D-034A6353910B" target="_self"&gt;calculation&lt;/A&gt; and &lt;A href="https://pro.arcgis.com/en/pro-app/latest/help/data/geodatabases/overview/validation-attribute-rules.htm" target="_self"&gt;validation&lt;/A&gt; rules.&lt;/P&gt;&lt;P&gt;You also mention a sequence.&amp;nbsp; You can add a &lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/create-database-sequence.htm" target="_self"&gt;database sequence&lt;/A&gt; that starts at any value and increments by any value.&amp;nbsp; Typically these are used when adding a new feature, but I think you could write a validation rule such that if that field is &amp;lt;null&amp;gt; or 0, return the next &lt;A href="https://pro.arcgis.com/en/pro-app/latest/help/data/geodatabases/overview/attribute-rule-script-expression.htm#anchor1" target="_self"&gt;sequence value&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Is the cod_alfa always going to be 'PP' if so, I would simply calculate that field to equal 'PP'.&amp;nbsp; If you are adding features and want 'PP' to be the default, I suggest you use a &lt;A href="https://pro.arcgis.com/en/pro-app/latest/help/data/geodatabases/overview/an-overview-of-attribute-domains.htm" target="_self"&gt;domain&lt;/A&gt; for that.&lt;/P&gt;&lt;P&gt;I tinkered around a bit in the arcade ' &lt;A href="https://developers.arcgis.com/arcade/playground/" target="_self"&gt;playground&lt;/A&gt; '&amp;nbsp; and got the following code working:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var values = [0, 'PP', 1234]
var combined_value = [];

for (var i in values) {
    var value = values[i];
    if (value == 0) {
        value = "00000"
    }
    combined_value[Count(combined_value)] = value}
Console(Concatenate(combined_value, ""));&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The Console() function prints the value of the concatenated_value:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JoeBorgione_0-1614619842977.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/7198iB2D405CE4EF57C5F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JoeBorgione_0-1614619842977.png" alt="JoeBorgione_0-1614619842977.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Hopefully this helps a bit.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Mar 2021 17:31:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/concatenate-globalid-plus-other-field/m-p/1031573#M37999</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2021-03-01T17:31:16Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenate GlobalID plus other field</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/concatenate-globalid-plus-other-field/m-p/1032535#M38101</link>
      <description>&lt;P&gt;Oh yes maybe is better change the title.&lt;BR /&gt;So,&lt;BR /&gt;1- I'd to validate the values and to fire the same rules when i add a new feature or divide a polygon.&lt;BR /&gt;2-I noted that is necessary to have a globalId field (even if I don't use it) to use the 'nextsequencevalue'&lt;BR /&gt;3- And, yes, the cod_alf will be always 'PP'.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thanks &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/3374"&gt;@JoeBorgione&lt;/a&gt;&amp;nbsp;, i'll follow yours advices&lt;BR /&gt;let you know&lt;/P&gt;&lt;P&gt;Grazie!&lt;/P&gt;</description>
      <pubDate>Wed, 03 Mar 2021 17:45:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/concatenate-globalid-plus-other-field/m-p/1032535#M38101</guid>
      <dc:creator>thainamota</dc:creator>
      <dc:date>2021-03-03T17:45:23Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenate GlobalID plus other field</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/concatenate-globalid-plus-other-field/m-p/1032542#M38103</link>
      <description>&lt;P&gt;In order to deploy address rules on a feature or table record, they must be assigned Global IDs.&amp;nbsp; You accomplish this with &lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/add-global-ids.htm" target="_self"&gt;Add Global IDs&lt;/A&gt;.&amp;nbsp; Global IDs are generated and maintained behind the scenes by the geodatabase itself.&amp;nbsp; So if you copy or otherwise move the records to another geodatabse, the global ids will change.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Mar 2021 17:51:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/concatenate-globalid-plus-other-field/m-p/1032542#M38103</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2021-03-03T17:51:11Z</dc:date>
    </item>
  </channel>
</rss>

