Question

Reading ArcGIS Online feature services with attachments overwrites edit tracking fields (Creator, CreationDate, Editor, Edit date)

  • 31 December 2018
  • 8 replies
  • 6 views

Badge

Hello,

I'm trying to read ArcGIS Online feature services with attachments into a local file geodatabase. I've been able to manage that, however, I noticed every time the script is run, it overwrites the edit tracking attributes. We need to be able to retain ArcGIS Online attributes intact to know who has created/edited the records in ArcGIS Online.

Any suggestions on how to keep the attribute intact, so they are not overwritten during the process?

Thank you for your help


8 replies

Badge

@gangwarmanoj, @takashi @trentatsafe @NatalieAtSafe I will appreciate your inputs

Badge

@gangwarmanoj, @takashi @trentatsafe @NatalieAtSafe I will appreciate your inputs

Hello @rosi,

As per your explanation you are saying that you are pulling data from AGOL to GDB and in that case how is it possible AGOL data is overridden in AGOL? are you writing something back to AGOL also.

Regards,

Manoj

Badge

@gangwarmanoj, @takashi @trentatsafe @NatalieAtSafe I will appreciate your inputs

Sorry if I didn't explain it clearly. What I meant was when the data is written to the FGDB, the attributes for edit tracking fields are overwritten by my username, as I run the script. we need to copy the data as it is in AGOL into the FGDB, so we can identify who has actually captured the data. for example for the record A in AGOL, we have CreationDate as 20/12/2018, Creator as John, Editor: John, Edit date: 22/12/2018. When I run the script in the FGDB I get, CreationDate as 2/01/2019, Creator: Rosi, Editor: Rosi and edit date as the time and date I've run the script.

Badge

To write the attachements from AGOL to a FGDB I've followed the workflow suggested by @trentatsafe on https://knowledge.safe.com/articles/45301/writing-arcgis-geodatabase-attachments.html

Badge

 

I have done the same thing by using python scripts and http caller.

for GDB database-

Before downloading from AGOL to GDB you need to switch off "Editor Tracking" in GDB. Manually you can do that by selecting Catalog-->'Select you table inside GDB database' --> Right click targeted table --> In popup menu select 'Manage' --> Select 'Disable Editors Tracking' to disable and 'Enable Editors Tracking' to enable.

If you want to automate this process you can write python script in Workspace 'Workspace Parameters' -->Scripting --> Startup Python Script (script to disable) || Shutdown Python Script (script to enable).

 

while downloading either you can create 2 new fields to capture data for required fields or you can redirect values from 'Editors' and 'edit date' into 'last edit user' & 'last edit date'.

 

For AGOL-

Manually you can switch off tracking by

select target layer --> Settings --> uncheck "Keep track of who created and last updated feature" and save.

to achieve this through workbench , I have used httpcaller to switch off and on(generating token and used that token to switch off and on).

 

Let me know if you need further help on this.

 

Thanks,

Manoj

 

Badge

@gangwarmanoj, @takashi @trentatsafe @NatalieAtSafe I will appreciate your inputs

 

I have done the same thing by using python scripts and http caller.

for GDB database-

Before downloading from AGOL to GDB you need to switch off "Editor Tracking" in GDB. Manually you can do that by selecting Catalog-->'Select you table inside GDB database' --> Right click targeted table --> In popup menu select 'Manage' --> Select 'Disable Editors Tracking' to disable and 'Enable Editors Tracking' to enable.

If you want to automate this process you can write python script in Workspace 'Workspace Parameters' -->Scripting --> Startup Python Script (script to disable) || Shutdown Python Script (script to enable).

 

while downloading either you can create 2 new fields to capture data for required fields or you can redirect values from 'Editors' and 'edit date' into 'last edit user' & 'last edit date'.

 

For AGOL-

Manually you can switch off tracking by

select target layer --> Settings --> uncheck "Keep track of who created and last updated feature" and save.

to achieve this through workbench , I have used httpcaller to switch off and on(generating token and used that token to switch off and on).

 

Let me know if you need further help on this.

 

Thanks,

Manoj

 

Badge

Sorry if I didn't explain it clearly. What I meant was when the data is written to the FGDB, the attributes for edit tracking fields are overwritten by my username, as I run the script. we need to copy the data as it is in AGOL into the FGDB, so we can identify who has actually captured the data. for example for the record A in AGOL, we have CreationDate as 20/12/2018, Creator as John, Editor: John, Edit date: 22/12/2018. When I run the script in the FGDB I get, CreationDate as 2/01/2019, Creator: Rosi, Editor: Rosi and edit date as the time and date I've run the script.

In that case , I guess you left Editors tracking 'on; in GDB. What happens if your editor tracking is 'on' in GDB than when you update anything will be replaced by logged in USER. I have explained that bit in my post. Have a look and let me know if you have any further questions on that.

Badge

Thank you @gangwarmanoj, I didn't realise editor tracking can be disabled in a local GDB as well. I was under the impression that this functionality is only available on SDE. disabling editor tracking did fix the issue.

Reply