I'm working on ArcGIS 10.4.2 in Windows.
I have published a feature service to our ArcGIS Server and then added the service to our Portal from a feature class that has Editor Tracking and attachments enabled. In the database I created a sequence called TreeNumber, which I increment with a trigger on the table (feature class) after insert. It is seperate from the ObjectID.
If I add a feature in ArcMap, everything is fine - the attachment works and the TreeNumber is assigned and saved.
If I add a feature using JSON, talking directly to the REST endpoint, TreeNumber is assigned and saved. (I haven't worked out how to add an attachment through the REST endpoint.)
If I add a feature in a Webmap, the attachment works but the TreeNumber is NULL after saving.
If I add a feature in a WebApp (built in WebApp Builder), the attachment works in IE but not in Chrome or Firefox. In all of them the TreeNumber remains NULL.
The Portal uses https and a web adaptor and is on the same server as the ArcGIS server.
The data is in a SQL Server 2012 Enterprise Geodatabase on a server separate from the ArcGIS server.
Can anyone help me with this?