<?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: Add GUID field to existing AGOL Survey123 feature layer in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/add-guid-field-to-existing-agol-survey123-feature/m-p/1699703#M68588</link>
    <description>&lt;DIV&gt;&lt;SPAN&gt;[Esri, please delete this comment too.]&lt;/SPAN&gt;&lt;/DIV&gt;</description>
    <pubDate>Mon, 04 May 2026 13:48:14 GMT</pubDate>
    <dc:creator>Bud</dc:creator>
    <dc:date>2026-05-04T13:48:14Z</dc:date>
    <item>
      <title>Add GUID field to existing AGOL Survey123 feature layer — Field not auto-populating?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/add-guid-field-to-existing-agol-survey123-feature/m-p/1698341#M68515</link>
      <description>&lt;P&gt;I have a Survey123 feature layer that was created using the Survey123 wizard.&lt;/P&gt;&lt;P&gt;I need a custom auto-populated unique ID field, so I've added a GUID field using AGOL &amp;gt; Data &amp;gt; Fields. This is the resulting field:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bud_0-1777056938401.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/151567i9ACE91BF8A376C44/image-size/large?v=v2&amp;amp;px=999" role="button" title="Bud_0-1777056938401.png" alt="Bud_0-1777056938401.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Problem:&lt;/P&gt;&lt;P&gt;When I create new features in an Experience Builder app using the Editor widget, the new GUID field is not being populated. Why isn't it being populated?&lt;/P&gt;&lt;P&gt;Use Case:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/arcgis-online-questions/auto-populate-unique-id-field-in-hosted-feature/m-p/1698244/highlight/true#M68508" target="_self"&gt;Auto-populate unique ID field in hosted feature layer (common ID between copy/pasted features in ExB)&lt;/A&gt;&lt;BR /&gt;I need a custom unique ID field so the values will be copy/pasted into a new feature in a different feature layer. The ExB editor widget matches fields in the source layer (the Survey123 layer) with fields in the destination layer, where the field names are an exact match. I can't use the OOTB OBJECTID or GlobalID fields from the source layer, because the destination feature will get &lt;U&gt;&lt;EM&gt;new&lt;/EM&gt;&lt;/U&gt; values in those fields, not the values from the source feature.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Related AGOL Question:&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-online-questions/use-database-sequence-function-from-agol-layer/m-p/1699767/highlight/true#M68590" target="_self"&gt;Use database sequence function from AGOL layer/table to generate unique integer IDs?&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 04 May 2026 14:58:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/add-guid-field-to-existing-agol-survey123-feature/m-p/1698341#M68515</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2026-05-04T14:58:25Z</dc:date>
    </item>
    <item>
      <title>Re: Add GUID field to existing AGOL Survey123 feature layer</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/add-guid-field-to-existing-agol-survey123-feature/m-p/1698411#M68519</link>
      <description>&lt;P&gt;GUID fields don't autopopulate, they default to null.&amp;nbsp; They're typically up to the application or an editor to set.&lt;/P&gt;&lt;P&gt;You could make a hidden field in your S123 form for the question and use the uuid() function to populate it.&lt;/P&gt;&lt;P&gt;Alternatively, you can use the Admin REST API to create the field with a NEWID() default value, with the Add to Definition endpoint of the layer.&amp;nbsp; It may be possible to update an existing field's default value with this as well, but I haven't tried it.&amp;nbsp; This will make the field autopopulate with a new value in the same way that Global IDs are autopopulated:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;{
  "fields":
  [
    {
      "name" : "MyID", 
      "type" : "esriFieldTypeGUID", 
      "alias" : "My ID", 
      "sqlType" : "sqlTypeOther", 
      "length" : 38, 
      "nullable" : false, 
      "editable" : false, 
      "domain" : null, 
      "defaultValue" : "NEWID() WITH VALUES"
    }
  ]
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 25 Apr 2026 00:20:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/add-guid-field-to-existing-agol-survey123-feature/m-p/1698411#M68519</guid>
      <dc:creator>MobiusSnake</dc:creator>
      <dc:date>2026-04-25T00:20:15Z</dc:date>
    </item>
    <item>
      <title>Re: Add GUID field to existing AGOL Survey123 feature layer</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/add-guid-field-to-existing-agol-survey123-feature/m-p/1698417#M68520</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/115587"&gt;@MobiusSnake&lt;/a&gt;&amp;nbsp;You. Are. A. LIFE SAVER!&lt;BR /&gt;&lt;BR /&gt;I've been monitoring these recent posts from&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/351335"&gt;@Bud&lt;/a&gt;&amp;nbsp;closely because I have a very similar use-case/issue. In my workflow, I create feature layers with a python script that references a JSON file with the service definition. I only needed to add a slight modification - default value is just &lt;STRONG&gt;"NEWID()"&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;I'll share my workflow/screenshots in case it might help someone:&lt;STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;After creating the feature layer, I opened it in a web map and created a feature. At first I was worried because the interface looked like this:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Katie_Clark_0-1777077648866.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/151599i34ED0C5D66AF9140/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Katie_Clark_0-1777077648866.png" alt="Katie_Clark_0-1777077648866.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;But after submitting the form and checking the attribute table, the value was populated!!&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Katie_Clark_1-1777077709762.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/151600i6C5785C172B081DC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Katie_Clark_1-1777077709762.png" alt="Katie_Clark_1-1777077709762.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;I'm going to test further to see if I can get this integrated into the app I'm building, but this is huge. I really thought it wasn't possible to do this kind of thing and lots of research didn't turn up anything. Thanks again!&lt;/P&gt;</description>
      <pubDate>Sat, 25 Apr 2026 00:45:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/add-guid-field-to-existing-agol-survey123-feature/m-p/1698417#M68520</guid>
      <dc:creator>Katie_Clark</dc:creator>
      <dc:date>2026-04-25T00:45:25Z</dc:date>
    </item>
    <item>
      <title>Re: Add GUID field to existing AGOL Survey123 feature layer</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/add-guid-field-to-existing-agol-survey123-feature/m-p/1699172#M68560</link>
      <description>&lt;P&gt;Auto-populated GUIDs via NEWID() function — In web map, display a more intuitive value in the Edit tool&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/arcgis-online-ideas/auto-populated-guids-via-newid-function-in-web-map/idi-p/1699170/highlight/true" target="_blank"&gt;https://community.esri.com/t5/arcgis-online-ideas/auto-populated-guids-via-newid-function-in-web-map/idi-p/1699170/highlight/true&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Apr 2026 19:52:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/add-guid-field-to-existing-agol-survey123-feature/m-p/1699172#M68560</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2026-04-29T19:52:17Z</dc:date>
    </item>
    <item>
      <title>Re: Add GUID field to existing AGOL Survey123 feature layer</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/add-guid-field-to-existing-agol-survey123-feature/m-p/1699644#M68583</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/115587"&gt;@MobiusSnake&lt;/a&gt;&amp;nbsp;This really helped me. Thanks.&lt;/P&gt;&lt;P&gt;Any idea where we can find documentation on&amp;nbsp;NEWID() ?&lt;/P&gt;</description>
      <pubDate>Fri, 01 May 2026 18:47:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/add-guid-field-to-existing-agol-survey123-feature/m-p/1699644#M68583</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2026-05-01T18:47:14Z</dc:date>
    </item>
    <item>
      <title>Re: Add GUID field to existing AGOL Survey123 feature layer</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/add-guid-field-to-existing-agol-survey123-feature/m-p/1699688#M68584</link>
      <description>&lt;P&gt;I've never seen it mentioned in Esri doc.&amp;nbsp; I noticed it in Global ID field JSON definitions, read about it in T-SQL doc, then tried using it on a GUID field to see if it would work.&amp;nbsp; I've tried throwing other T-SQL functions into field defaults and view definition queries with mixed results.&lt;/P&gt;</description>
      <pubDate>Sat, 02 May 2026 00:57:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/add-guid-field-to-existing-agol-survey123-feature/m-p/1699688#M68584</guid>
      <dc:creator>MobiusSnake</dc:creator>
      <dc:date>2026-05-02T00:57:57Z</dc:date>
    </item>
    <item>
      <title>Re: Add GUID field to existing AGOL Survey123 feature layer</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/add-guid-field-to-existing-agol-survey123-feature/m-p/1699690#M68585</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/115587"&gt;@MobiusSnake&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You mentioned T-SQL. Is the AGOL database SQL Server? I assumed it was PostgreSQL. But not my area of expertise.&lt;/P&gt;</description>
      <pubDate>Sat, 02 May 2026 01:38:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/add-guid-field-to-existing-agol-survey123-feature/m-p/1699690#M68585</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2026-05-02T01:38:15Z</dc:date>
    </item>
    <item>
      <title>Re: Add GUID field to existing AGOL Survey123 feature layer</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/add-guid-field-to-existing-agol-survey123-feature/m-p/1699691#M68586</link>
      <description>&lt;P&gt;I always thought it was PostgreSQL as well, but as far as I can tell NEWID() doesn't exist in PostgreSQL (although this is outside of my expertise as well).&lt;/P&gt;&lt;P&gt;I know concatenation can be done using the || operator, which I thought was a PostgreSQL thing and not a SQL Server thing, so I'm pretty fuzzy on what's going on under the hood.&lt;/P&gt;</description>
      <pubDate>Sat, 02 May 2026 03:36:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/add-guid-field-to-existing-agol-survey123-feature/m-p/1699691#M68586</guid>
      <dc:creator>MobiusSnake</dc:creator>
      <dc:date>2026-05-02T03:36:59Z</dc:date>
    </item>
    <item>
      <title>Re: Add GUID field to existing AGOL Survey123 feature layer</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/add-guid-field-to-existing-agol-survey123-feature/m-p/1699692#M68587</link>
      <description>&lt;P&gt;[Esri, please delete this comment too.]&lt;/P&gt;</description>
      <pubDate>Mon, 04 May 2026 13:46:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/add-guid-field-to-existing-agol-survey123-feature/m-p/1699692#M68587</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2026-05-04T13:46:57Z</dc:date>
    </item>
    <item>
      <title>Re: Add GUID field to existing AGOL Survey123 feature layer</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/add-guid-field-to-existing-agol-survey123-feature/m-p/1699703#M68588</link>
      <description>&lt;DIV&gt;&lt;SPAN&gt;[Esri, please delete this comment too.]&lt;/SPAN&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 04 May 2026 13:48:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/add-guid-field-to-existing-agol-survey123-feature/m-p/1699703#M68588</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2026-05-04T13:48:14Z</dc:date>
    </item>
    <item>
      <title>Re: Add GUID field to existing AGOL Survey123 feature layer — Field not auto-populating?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/add-guid-field-to-existing-agol-survey123-feature/m-p/1699728#M68589</link>
      <description>&lt;P&gt;Based on comments in&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-online-ideas/support-for-attribute-rules-in-arcgis-online/idc-p/1163300/highlight/true#M8856" target="_blank" rel="noopener"&gt;Support for Attribute rules in ArcGIS Online&lt;/A&gt;:&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/166941"&gt;@Allison_Hockey&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/280855"&gt;@IvanKozoletov1&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/495868"&gt;@PaulBarr&lt;/a&gt;&amp;nbsp; &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/145500"&gt;@RichardLittlefield&lt;/a&gt;&amp;nbsp; &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/8180"&gt;@KevinMayall&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/115671"&gt;@CalvinHarmin&lt;/a&gt;&amp;nbsp; &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/215649"&gt;@LeviCecil&lt;/a&gt;&amp;nbsp;might find this post interesting.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You might also like&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-online-ideas/expression-field-in-view-using-agol-ui/idi-p/1699729/highlight/true" target="_self"&gt;Expression field in view using AGOL UI&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN&gt;Since you mentioned Survey123 if you are using &lt;STRONG&gt;Connect&lt;/STRONG&gt;, there is&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;uuid() function you can use to populate a unique id&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/arcgis-online-questions/auto-populate-unique-id-field-in-hosted-feature/m-p/1698270/highlight/true#M68512" target="_blank" rel="noopener"&gt;https://community.esri.com/t5/arcgis-online-questions/auto-populate-unique-id-field-in-hosted-feature/m-p/1698270/highlight/true#M68512&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;BR /&gt;And&amp;nbsp;&lt;A href="https://www.esri.com/arcgis-blog/products/arcgis-online/data-management/understanding-relationship-classes-in-arcgis-online-hosted-feature-services" target="_self"&gt;Understanding Relationship Classes in ArcGIS Online Hosted Feature Services&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 03 May 2026 16:33:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/add-guid-field-to-existing-agol-survey123-feature/m-p/1699728#M68589</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2026-05-03T16:33:11Z</dc:date>
    </item>
    <item>
      <title>Re: Add GUID field to existing AGOL Survey123 feature layer</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/add-guid-field-to-existing-agol-survey123-feature/m-p/1699776#M68594</link>
      <description>&lt;P&gt;I was playing around with default values in a integer column in a hosted feature layer.&lt;/P&gt;&lt;P&gt;1+1 worked as a default value:&lt;/P&gt;&lt;PRE&gt;{
  "fields":
  [
    {
      "name" : "MyID6", 
      "type" : "esriFieldTypeInteger", 
      "alias" : "My ID 6", 
      "sqlType" : "sqlTypeOther", 
      "length" : 38, 
      "nullable" : false, 
      "editable" : false, 
      "domain" : null, 
     &lt;STRONG&gt; "defaultValue" : "1+1"&lt;/STRONG&gt;
    }
  ]
}&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bud_0-1777870771345.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/151893iF0B1241D604A7BF6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bud_0-1777870771345.png" alt="Bud_0-1777870771345.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But when I tried&amp;nbsp;OBJECTID+1, I got an error message:&lt;/P&gt;&lt;PRE&gt;{
  "fields":
  [
    {
      "name" : "MyID7", 
      "type" : "esriFieldTypeInteger", 
      "alias" : "My ID 7", 
      "sqlType" : "sqlTypeOther", 
      "length" : 38, 
      "nullable" : false, 
      "editable" : false, 
      "domain" : null, 
      &lt;STRONG&gt;"defaultValue" : "OBJECTID+1"&lt;/STRONG&gt;
    }
  ]
}&lt;/PRE&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;The name \"OBJECTID\" is not permitted in this context. Valid expressions are constants, constant expressions, and (in some contexts) variables. Column names are not permitted.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bud_2-1777870922718.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/151895i86D8F367F5C91F3D/image-size/large?v=v2&amp;amp;px=999" role="button" title="Bud_2-1777870922718.png" alt="Bud_2-1777870922718.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I googled the second sentence of that error message, and it appears to be a SQL Server message.&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;This message is a specific &lt;STRONG&gt;SQL Server error (Msg 128)&lt;/STRONG&gt; that occurs when you attempt to use a column name in a database context where it is not allowed, such as within a DEFAULT constraint or during a data insertion where string quotes are missing.&lt;/P&gt;&lt;P&gt;Using Columns in Default Constraints: You cannot set a column's DEFAULT value to equal the value of another column in the same table.&lt;/P&gt;&lt;P&gt;&lt;A href="https://share.google/aimode/tmot43yg8Iehd54KU" target="_blank" rel="noopener"&gt;https://share.google/aimode/tmot43yg8Iehd54KU&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;STRONG&gt;So I guess that's more evidence that we're dealing with SQL Server?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Additionally, I've seen some JSON examples online that have&amp;nbsp;&lt;FONT face="courier new,courier" color="#0000FF"&gt;"defaultValue": "GetDate() WITH VALUES"&lt;/FONT&gt;.&amp;nbsp;&amp;nbsp;GetDate() appears to be a SQL Server thing too.&lt;/P&gt;</description>
      <pubDate>Mon, 04 May 2026 05:12:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/add-guid-field-to-existing-agol-survey123-feature/m-p/1699776#M68594</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2026-05-04T05:12:51Z</dc:date>
    </item>
    <item>
      <title>Re: Add GUID field to existing AGOL Survey123 feature layer</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/add-guid-field-to-existing-agol-survey123-feature/m-p/1699791#M68595</link>
      <description>&lt;P&gt;I jumped back into this (it was a while ago I was looking into this) and found an interesting one that does seem to work for me, IDENT_CURRENT().&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;{"fields":[
{
      "name" : "ID_1", 
      "type" : "esriFieldTypeInteger", 
      "alias" : "My ID 1", 
      "sqlType" : "sqlTypeOther", 
      "nullable" : true, 
      "editable" : true, 
      "visible" : true, 
      "domain" : null, 
      "defaultValue" : "IDENT_CURRENT('db_1234.user_56789.my_table_name')"
    }
]}&lt;/LI-CODE&gt;&lt;P&gt;Replacing the parameter of IDENT_CURRENT with the layer/table's internal table name (you can get this from the layer/table properties in the Admin REST API) gives me a copy of the Object ID.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Maybe&lt;/EM&gt; you could concatenate this with a string?&amp;nbsp; Although I haven't had any luck using concatenation in default values, I've only used it within definition expressions.&lt;/P&gt;</description>
      <pubDate>Mon, 04 May 2026 08:35:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/add-guid-field-to-existing-agol-survey123-feature/m-p/1699791#M68595</guid>
      <dc:creator>MobiusSnake</dc:creator>
      <dc:date>2026-05-04T08:35:39Z</dc:date>
    </item>
    <item>
      <title>Re: Add GUID field to existing AGOL Survey123 feature layer</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/add-guid-field-to-existing-agol-survey123-feature/m-p/1699822#M68599</link>
      <description>&lt;P&gt;Nice find!&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN&gt;Replacing the parameter of IDENT_CURRENT with the layer/table's internal table name (you can get this from the layer/table properties in the Admin REST API) gives me a copy of the Object ID.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN&gt;I didn't see the &lt;U&gt;database name, user name, or true table name&lt;/U&gt;&amp;nbsp;in the Admin REST API page. But I did find it in the JSON definition of the layer.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bud_0-1777902185834.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/151914i06A62257AC724C43/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bud_0-1777902185834.png" alt="Bud_0-1777902185834.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Is that where you got yours too, or am I missing something in the main&amp;nbsp;Admin REST API page?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Also, a couple of observations:&lt;/SPAN&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;This technique doesn't seem to back-populate existing rows properly, when&amp;nbsp;&lt;FONT face="courier new,courier" color="#0000FF"&gt;nullable:false&lt;/FONT&gt;. The existing rows will all be set to the same value — the largest OBJECTID. I suppose this could be corrected with a field calculation if the field is editable.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bud_5-1777901515742.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/151908i398A62419E394949/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bud_5-1777901515742.png" alt="Bud_5-1777901515742.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;STRONG&gt;Edit:&lt;/STRONG&gt;&amp;nbsp;I wonder if we should keep an eye on this in other scenarios. Are there any gotchas? For example, what happens if we bulk load or populate rows? Will it populate the IDs correctly, or will they all be the same value (the largest OBJECTID)?&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;&lt;SPAN&gt;I ended up disabling editing on this field because when &lt;FONT face="courier new,courier" color="#0000FF"&gt;editable:true&lt;/FONT&gt; (and when &lt;FONT face="courier new,courier" color="#0000FF"&gt;nullable:true&lt;/FONT&gt;), the web map Edit pane was setting the field to null, overriding the default value.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bud_2-1777901031771.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/151905i83CEC31304CD1984/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bud_2-1777901031771.png" alt="Bud_2-1777901031771.png" /&gt;&lt;/span&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bud_3-1777901107350.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/151906i1AB006C992A99CAE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bud_3-1777901107350.png" alt="Bud_3-1777901107350.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is what I settled on:&lt;/P&gt;&lt;PRE&gt;{
  "fields":
  [
    {
      "name" : "unique_id", 
      "type" : "esriFieldTypeInteger", 
      "alias" : "Unique ID", 
      "sqlType" : "sqlTypeOther", 
    &lt;FONT color="#0000FF"&gt;  &lt;STRONG&gt;"nullable" : true, 
      "editable" : false,&lt;/STRONG&gt; &lt;/FONT&gt;
      "visible" : true, 
      "domain" : null, 
      &lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;"defaultValue" : "IDENT_CURRENT('db_2xxxx.user_2xxxx.test_layer_TEST_LAYER')"&lt;/STRONG&gt;&lt;/FONT&gt;
    }
  ]
}&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bud_4-1777901316009.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/151907iC45C92F248791785/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bud_4-1777901316009.png" alt="Bud_4-1777901316009.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 May 2026 13:54:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/add-guid-field-to-existing-agol-survey123-feature/m-p/1699822#M68599</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2026-05-04T13:54:09Z</dc:date>
    </item>
    <item>
      <title>Re: Add GUID field to existing AGOL Survey123 feature layer</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/add-guid-field-to-existing-agol-survey123-feature/m-p/1699847#M68603</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN&gt;I didn't see the&amp;nbsp;&lt;/SPAN&gt;database name, user name, or true table name&lt;SPAN&gt;&amp;nbsp;in the Admin REST API page. But I did find it in the JSON definition of the layer.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN&gt;Sorry, I meant the JSON definition.&lt;/SPAN&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN&gt;I wonder if we should keep an eye on this in other scenarios. Are there any gotchas? For example, what happens if we bulk load or populate rows? Will it populate the IDs correctly, or will they all be the same value (the largest OBJECTID)?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN&gt;For sure, I'd be very hesitant to use this in any kind of production system without a lot of testing.&amp;nbsp; I wonder if there'd be any issues with syncing new records created in something like Field Maps (presumably not if it was through a view with this ID field hidden).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;So far I'm totally stumped on getting any text functions to work ... everything I try to put into a string field just ends up writing the function name and parameters as a literal string, e.g. "CONCAT(&lt;EM&gt;v1&lt;/EM&gt;, &lt;EM&gt;v2&lt;/EM&gt;)" .&amp;nbsp; I'm not sure whether there's a way around that.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 04 May 2026 14:28:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/add-guid-field-to-existing-agol-survey123-feature/m-p/1699847#M68603</guid>
      <dc:creator>MobiusSnake</dc:creator>
      <dc:date>2026-05-04T14:28:54Z</dc:date>
    </item>
    <item>
      <title>Re: Add GUID field to existing AGOL Survey123 feature layer</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/add-guid-field-to-existing-agol-survey123-feature/m-p/1699854#M68606</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN&gt;So far I'm totally stumped on getting any text functions to work ... everything I try to put into a string field just ends up writing the function name and parameters as a literal string, e.g. "CONCAT(&lt;/SPAN&gt;&lt;EM&gt;v1&lt;/EM&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;EM&gt;v2&lt;/EM&gt;&lt;SPAN&gt;)" .&amp;nbsp; I'm not sure whether there's a way around that.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN&gt;The same thing happens for me. I wonder if Esri (or an underlying mechanism) has intentionally disabled expressions for text fields for security reasons. Would there be SQL injection concerns? That's not something I know anything about.&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;Whereas, maybe there aren't&amp;nbsp;SQL injection concerns for GUID or integer fields, so expressions are allowed there.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Or, does the system just have no way of differentiating a literal string from an expression/function? And GUID &amp;amp; integer fields don't have this problem because strings aren't valid in those fields?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;Edit&lt;/STRONG&gt; - AGOL idea:&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-online-ideas/allow-expressions-in-agol-string-field-gt-default/idi-p/1699876/highlight/true" target="_self"&gt;Allow expressions in AGOL string field &amp;gt; default value&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 04 May 2026 15:38:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/add-guid-field-to-existing-agol-survey123-feature/m-p/1699854#M68606</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2026-05-04T15:38:16Z</dc:date>
    </item>
    <item>
      <title>Re: Add GUID field to existing AGOL Survey123 feature layer — Field not auto-populating?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/add-guid-field-to-existing-agol-survey123-feature/m-p/1699862#M68608</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/115587"&gt;@MobiusSnake&lt;/a&gt;&amp;nbsp;Regarding...&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;"defaultValue" : "NEWID() WITH VALUES"&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;...in your original JSON definition for a GUID default value:&lt;/P&gt;&lt;PRE&gt;{
  "fields":
  [
    {
      "name" : "MyID", 
      "type" : "esriFieldTypeGUID", 
      "alias" : "My ID", 
      "sqlType" : "sqlTypeOther", 
      "length" : 38, 
      "nullable" : false, 
      "editable" : false, 
      "domain" : null, 
&lt;STRONG&gt;      "defaultValue" : "NEWID() WITH VALUES"&lt;/STRONG&gt;
    }
  ]
}&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;As far as I can tell, WITH VALUES doesn't seem to do anything, and can be removed from the JSON.&lt;/P&gt;&lt;P&gt;At first, I thought WITH VALUES was responsible for back-populating existing rows. But now I suspect making the field not nullable is responsible for&amp;nbsp;back-populating existing rows.&lt;/P&gt;&lt;P&gt;Do you see the same thing on your end?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 May 2026 15:09:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/add-guid-field-to-existing-agol-survey123-feature/m-p/1699862#M68608</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2026-05-04T15:09:15Z</dc:date>
    </item>
    <item>
      <title>Re: Add GUID field to existing AGOL Survey123 feature layer — Field not auto-populating?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/add-guid-field-to-existing-agol-survey123-feature/m-p/1699923#M68609</link>
      <description>&lt;P&gt;I'm not sure about the best way to handle this for a hosted feature layer, but for a "regular" egdb layer, this can be done via. an attribute rule.&lt;/P&gt;</description>
      <pubDate>Mon, 04 May 2026 18:27:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/add-guid-field-to-existing-agol-survey123-feature/m-p/1699923#M68609</guid>
      <dc:creator>AJR</dc:creator>
      <dc:date>2026-05-04T18:27:18Z</dc:date>
    </item>
    <item>
      <title>Re: Add GUID field to existing AGOL Survey123 feature layer — Field not auto-populating?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/add-guid-field-to-existing-agol-survey123-feature/m-p/1699977#M68611</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN&gt;Do you see the same thing on your end?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN&gt;I didn't try it without NEW VALUES, I included that because I'd copied it directly from the Global ID definition&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 04 May 2026 23:14:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/add-guid-field-to-existing-agol-survey123-feature/m-p/1699977#M68611</guid>
      <dc:creator>MobiusSnake</dc:creator>
      <dc:date>2026-05-04T23:14:06Z</dc:date>
    </item>
  </channel>
</rss>

