AnsweredAssumed Answered

Adding attributes to a related table issues.

Question asked by on Aug 1, 2018

I've been trying to add a new record into a related table. Which I've been able to figure out(sort of) but I've run into other issues.


My first issue is when I try to add a new record to the related table the attributes do not come through. They appear as null when passing them through.  The related features globalID is present in the table and last edited user but the custom attributes I'm passing through fails.


My second issue is and it maybe related to my first issue but the related table records that are being added are not appearing in my sde until I compress the sde.  


I've tested this out using collector and can add a record to a related table(and works exactly how I would expect it to). So I know it isn't how I setup the relationship to the tables


Here is the code I've got going so far that writes data back to the feature service:

           FeatureLayer {
               id: featureLayer1
               ServiceFeatureTable {
                   id: relateTable
                   url: "/FeatureServer/1"
                   onApplyEditsStatusChanged: {
                                 if (applyEditsStatus === Enums.TaskStatusCompleted) {
                                     console.log("successfully added feature");
                   onAddFeatureStatusChanged: {
                              if (addFeatureStatus === Enums.TaskStatusCompleted) {
                                  // apply the edits to the service

onQueryFeaturesStatusChanged: {

if (queryFeaturesStatus === Enums.TaskStatusCompleted) {
if (!queryFeaturesResult.iterator.hasNext) {


var features = []

while (queryFeaturesResult.iterator.hasNext) {


var tolerance = 22;
var returnPopupsOnly = false;
var maximumResults = 1;

var featureAttributes = {"ID_TAG" : "0000-TEST"};

var featureNew = relateTable.createFeature(featureAttributes);



// mapView.identifyLayerWithMaxResults(features[0].geometry);