|
POST
|
I was playing around with default values in a integer column in a hosted feature layer. 1+1 worked as a default value: {
"fields":
[
{
"name" : "MyID6",
"type" : "esriFieldTypeInteger",
"alias" : "My ID 6",
"sqlType" : "sqlTypeOther",
"length" : 38,
"nullable" : false,
"editable" : false,
"domain" : null,
"defaultValue" : "1+1"
}
]
} But when I tried OBJECTID+1, I got an error message: {
"fields":
[
{
"name" : "MyID7",
"type" : "esriFieldTypeInteger",
"alias" : "My ID 7",
"sqlType" : "sqlTypeOther",
"length" : 38,
"nullable" : false,
"editable" : false,
"domain" : null,
"defaultValue" : "OBJECTID+1"
}
]
} 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. I googled the second sentence of that error message, and it appears to be a SQL Server message. This message is a specific SQL Server error (Msg 128) 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. Using Columns in Default Constraints: You cannot set a column's DEFAULT value to equal the value of another column in the same table. https://share.google/aimode/tmot43yg8Iehd54KU So I guess that's more evidence that we're dealing with SQL Server? Additionally, I've seen some JSON examples online that have "defaultValue": "GetDate() WITH VALUES". GetDate() appears to be a SQL Server thing too.
... View more
05-03-2026
10:12 PM
|
0
|
5
|
1138
|
|
POST
|
Would someone with DBA privileges in an on-prem Portal datastore database be able to poke around in a table to see if there are any database sequences used that would also be available in AGOL? (This is more of an “out of curiosity” thing to see if we can learn anything interesting, not necessarily something that should be done in a mission-critical AGOL feature layer without testing.)
... View more
05-03-2026
04:50 PM
|
0
|
0
|
477
|
|
POST
|
It’s possible to automatically populate the default value of an AGOL hosted feature layer GUID field using NEWID() WITH VALUES, using the Admin REST API. https://community.esri.com/t5/arcgis-online-questions/add-guid-field-to-existing-agol-survey123-feature/m-p/1698411/highlight/true#M68519 Is there a way to do something similar, but instead of populating a GUID field, populate a sequential integer in a number field? (Or a textual ID with a prefix like SEWER-0000001 ?) For example, is there a function similar to NEWID() that gets the next available integer for the layer/table from a database sequence? An integer would be preferable over a GUID because it’s shorter and human-readable. All of our other asset IDs are integers or text-integer format, not GUIDs.
... View more
05-03-2026
04:37 PM
|
0
|
3
|
522
|
|
IDEA
|
Idea: Expression field in advanced AGOL view without join
... View more
05-03-2026
07:25 AM
|
0
|
0
|
480
|
|
IDEA
|
It sounds like we can add calculated expression fields to “advanced views” in AGOL via the Admin REST API. The view would be uneditable. Add to Definition (Feature Service) "sourceLayerFields": [
{
"name": "zipcode",
"source": "zipcode"
},
{
"name": "salesavg",
"alias": "SaleAveragePerCustomer",
"expression": "(Total_Sales_FY13 + Total_Sales_FY14) / Customers",
"type": "esriFieldTypeDouble"
}
] LinkedIn video: https://www.linkedin.com/posts/abdillahi-hassan-56a020134_esri-arcgis-ugcPost-7360636518803152896-NnkQ/ (It also looks like there's some GROUP BY / aggregation functionality in some of the JSON examples too.) This idea is to create an expression field in a view using the UI, instead of using the Admin REST API, which isn’t user friendly for non-developers.
... View more
05-03-2026
07:15 AM
|
4
|
1
|
485
|
|
POST
|
Based on comments in Support for Attribute rules in ArcGIS Online: @Allison_Hockey @IvanKozoletov1 @PaulBarr @RichardLittlefield @KevinMayall @CalvinHarmin @LeviCecil might find this post interesting. You might also like Expression field in view using AGOL UI. Also: Since you mentioned Survey123 if you are using Connect, there is uuid() function you can use to populate a unique id https://community.esri.com/t5/arcgis-online-questions/auto-populate-unique-id-field-in-hosted-feature/m-p/1698270/highlight/true#M68512 And Understanding Relationship Classes in ArcGIS Online Hosted Feature Services
... View more
05-03-2026
06:56 AM
|
1
|
0
|
1018
|
|
IDEA
|
For anyone who’s interested, it sounds like we can add calculated expression fields to “advanced views” in AGOL via the Admin REST API. The view would be uneditable. And this only seems to work for views with joins. Add to Definition (Feature Service) "sourceLayerFields": [
{
"name": "zipcode",
"source": "zipcode"
},
{
"name": "salesavg",
"alias": "SaleAveragePerCustomer",
"expression": "(Total_Sales_FY13 + Total_Sales_FY14) / Customers",
"type": "esriFieldTypeDouble"
}
] Abdillahi Hassan shows it in a video on LinkedIn: https://www.linkedin.com/posts/abdillahi-hassan-56a020134_esri-arcgis-ugcPost-7360636518803152896-NnkQ/ That’s not the same as attribute rules. But is related. Ideas: Expression field in view using AGOL UI Expression field in advanced AGOL view without join
... View more
05-03-2026
05:56 AM
|
0
|
0
|
295
|
|
POST
|
@MobiusSnake You mentioned T-SQL. Is the AGOL database SQL Server? I assumed it was PostgreSQL. But not my area of expertise.
... View more
05-01-2026
06:38 PM
|
0
|
9
|
1253
|
|
POST
|
@MobiusSnake This really helped me. Thanks. Any idea where we can find documentation on NEWID() ?
... View more
05-01-2026
11:47 AM
|
0
|
11
|
1267
|
|
IDEA
|
Would a EGDB constraint attribute rule error message be passed to the Portal ExB Editor widget?
... View more
05-01-2026
12:50 AM
|
0
|
0
|
265
|
|
IDEA
|
BUG-000184633: Edit widget in ArcGIS Experience builder does not copy attachments when using the copy/past feature and does not allow you to add attachments until creating the point. BUG-000184633 has been marked as a duplicate of ENH-000170575 (In Product Plan).
... View more
04-30-2026
04:39 PM
|
0
|
0
|
254
|
|
IDEA
|
BUG-000184633: Edit widget in ArcGIS Experience builder does not copy attachments when using the copy/past feature and does not allow you to add attachments until creating the point. BUG-000184633 has been marked as a duplicate of ENH-000170575 (In Product Plan).
... View more
04-30-2026
04:39 PM
|
0
|
0
|
199
|
|
IDEA
|
BUG-000184634: Pressing the “Windows + :” shortcut does not insert symbols into text fields within the ArcGIS Pro attribute table.
... View more
04-30-2026
04:37 PM
|
0
|
0
|
765
|
| Title | Kudos | Posted |
|---|---|---|
| 2 | Friday | |
| 3 | Friday | |
| 1 | 03-20-2023 10:24 AM | |
| 1 | 04-30-2026 11:08 AM | |
| 1 | 05-11-2026 11:23 AM |