Editor Tracking fields hidden in attributeinspector

1410
9
12-15-2016 12:59 PM
JeffPace
MVP Alum

I am trying to display (but not edit) the editor tracking fields of a layer in a feature service.  If editor tracking is disabled in the database, they show up fine.

However if i enable editor tracking in the database, the fields disappear in the attribute inspector.  They exist in the data, and in the json response, they are just not shown.  

Is there any way to display them? i have them set as isEditable = false;  in the code.

0 Kudos
9 Replies
JeffPace
MVP Alum

anyone? khutchins-esristaff

0 Kudos
KellyHutchins
Esri Frequent Contributor

I just ran a quick test and the editor tracking info shows up for me. Here's my test app: 

http://www.arcgis.com/apps/View/index.html?appid=dc902a58c3d947b3b87fb04fd12d4550 

0 Kudos
JeffPace
MVP Alum

Thanks for the reply, 

 I get a cannot create map when i click on your link.

I made  a fiddle

Edit fiddle - JSFiddle 

username:util

password:utilities

click on a blue dot, you will see some fields, but not the editor id fields.  Editorid is set in the database on, UTC time.

0 Kudos
KellyHutchins
Esri Frequent Contributor

When I test your JSFiddle I can see the editor tracking info in the popup. Here's a screen shot showing what I see. 

0 Kudos
JeffPace
MVP Alum

Exactly.  There should be six fields displaying.  

{'fieldName': 'BUSINESS_N', 'isEditable': true},
{'fieldName': 'ADDRESS', 'isEditable': true},
{'fieldName': 'CREATOR', 'isEditable': false},
{'fieldName': 'CREATIONDATE', 'isEditable': false},
{'fieldName': 'EDITORNAME', 'isEditable': false},
{'fieldName': 'LASTUPDATE', 'isEditable': false},

0 Kudos
JeffPace
MVP Alum

If i make the lone change of disabling editor tracking in the database, the fields immediately show up in the attribute inspector

0 Kudos
KellyHutchins
Esri Frequent Contributor

jeff.pace‌ I am pretty sure that this is by design. If you look at the image I shared you can see the editor date and owner info is displayed as text rather than an editable field. If editor tracking is enabled those fields will be auto populated based on the logged-in user and date/time.  

0 Kudos
JeffPace
MVP Alum

Right, so we can see lastupdate and editorname.  I understand that, but what about creatorname and creation date?

0 Kudos
KellyHutchins
Esri Frequent Contributor

Check out the getEditSummary help in the JSAPI. The attribute inspector uses this info to populate the editor tracking div.  There's some info that explains when you'll see the Created info. 

FeatureLayer | API Reference | ArcGIS API for JavaScript 3.18