AnsweredAssumed Answered

Editor Tracking fields not listed in Web APPBuilder

Question asked by jsn on Dec 19, 2016

Hello everyone,

 

I am editing a feature class in Web AppBuilder and I declared the fields CRTBY and MODBY in the feature class editor tracking field with ArCatalog

 

Web AppBuilder populates these fields automatically, but I am also testing if I can populate these fields in the program. The issue is that I am not able to see these fields in the source code.

 

When I run the code below it never finds CRTBY and MODBY. They are not in evt.adds[0].attributes

 

 

Widget.js


//
// Populate CRTBY and MODBY
//

if (evt.adds[0].attributes.hasOwnProperty('CRTBY')) {
evt.adds[0].attributes.CRTBY = esri.id.credentials[0].userId;
}
if (evt.adds[0].attributes.hasOwnProperty('MODBY')) {
evt.adds[0].attributes.MODBY = esri.id.credentials[0].userId;
}

 

this.editor.attributeInspector.refresh();

Outcomes