Currently I am generating Unique IDs for features in a hosted feature service as they are collected using a database trigger. I would like to generate unique IDs on a hosted feature layer in the same fashion. Since this data does not flow through our SQL database I am unable to use a database trigger. I believe this may be possible to accomplish using arcade expressions. I am wondering if anyone has used arcade expressions to generate unique IDs or generated a unique ID for a hosted feature layer some other way? Ideally these unique IDs would be generated for features as they are collected.
The functionality that you are refering to is called Attribute Rules: Introduction to attribute rules—Geodatabases | ArcGIS Desktop and more specific the Calculation Attribute Rule. This allows you to use the NextSequenceValue function to generate the next sequence value. The problem is that at this moment this functionality is only available in the enterprise geodatabase and not in ArcGIS Online.