Append Unsynced Field Map Relational Data Into Dataset

349
5
Jump to solution
02-04-2024 10:49 PM
Labels (3)
tiztrain
Occasional Contributor

Hey all,

I have a user that forgot to sync his data from Field Maps and the replicas have been disconnected in the meantime. The service contains a couple of feature classes and 4 tables, everything related to each other.

I have downloaded a copy of the service from AGOL and based on this article Preserving a GlobalID while moving data between Fe... - Esri Community, I have copied the data from this service to a 'Mobile Geodatabase'.

When I try to append the unsynced data, I get the following insert error 000597: Failed to insert input record with FeatureID <value>.—ArcGIS Pro | Documentation.

Looking for the correct methodology to append this data?

0 Kudos
1 Solution

Accepted Solutions
tiztrain
Occasional Contributor

If anybody else comes across this problem, you need to make sure that you are only appending values with unique globalid's. If the feature already exists in the original dataset (and you just downloaded a copy), then you must update the already existing feature and filter these existing records out of your append. You will only be appending new features then and it should work.

View solution in original post

0 Kudos
5 Replies
RhettZufelt
MVP Frequent Contributor

If the replicas are just disabled, but still on the device, you may be able to follow these directions to sync the edits back to the hosted feature service.

R_

0 Kudos
tiztrain
Occasional Contributor

I have not no problems extracting the data from the mobile device. The problem is appending due to having multiple related feature classes and tables. 

0 Kudos
RhettZufelt
MVP Frequent Contributor

I have only used this with non-related data, but since the directions show a 'sync offline edits' option, thought that it might keep all the relationships if the mobile database is recognized as a 'valid offline dataset'.

R_

0 Kudos
tiztrain
Occasional Contributor

It keeps the relationships together and that is all fine. The problem is trying to apend it to the original dataset due to the global IDs changing which in turns loses the connectivity between all the tables. Using MGDB is supposed to be the fix as it supports the option to 'preserve global IDs' but I get that error in the original post above

0 Kudos
tiztrain
Occasional Contributor

If anybody else comes across this problem, you need to make sure that you are only appending values with unique globalid's. If the feature already exists in the original dataset (and you just downloaded a copy), then you must update the already existing feature and filter these existing records out of your append. You will only be appending new features then and it should work.

0 Kudos