Hi Alice,
One possible solution is using a database trigger. Below is an example using SQL Server:
CREATE TRIGGER [Vector].[trg_insert_id]
ON [vector].[SITES]
FOR INSERT
AS
BEGIN
SET NOCOUNT ON;
DECLARE @ID float
SELECT @ID = MAX([SiteID])
FROM [vector].[SITES]
SELECT @ID
UPDATE [vector].[SITES]
SET SiteID = @ID + 0.00001
WHERE OBJECTID IN (SELECT OBJECTID FROM INSERTED)
END
The trigger is created on a feature class called 'Sites'. After a feature is added, the trigger finds the largest SiteID, adds 0.00001 to this value and then updates the SiteID with this value.
The above example is a for a non-versioned feature class. This will be more difficult for a versioned feature class. Each update to a feature will be an insert into the A table, causing the Site ID to increase. For example, you add a site and the Site ID is updated. If you go back and update the site (i.e. change an attribute), the Site ID will update again.
Also, when editing a feature in the web map the Site ID was not updated within the initial pop-up:
I set a refresh interval on the layer. After making the edit and the refresh occurs, I was able to see the Site ID update:
One issue that I ran into is with the editing. When using an ArcGIS Online Web Map/App, if I edited additional attributes, the trigger would not fire. I have to add a point, close the attribute window, select out of editing (i.e click on 'Details') and then go back into the edit session to update the other attributes. I'm currently looking into why this is occurring. Are you going to use an ArcGIS Online Web Map/App, or develop a custom one for the editors?