AnsweredAssumed Answered

Getting Empty "display Field Name" on Using esri/request

Question asked by behClevest on Dec 5, 2017
Latest reply on Dec 11, 2017 by rscheitlin

I am using esri/request function to Solve a geometric Network and retrieve data from an ArcGIS server. This is the code which I am using

 

require(["esri/request"], function(esriRequest) {
var params = {
f: "json"
};
  params.outFields = agsConfig.outFields;
  params.outSR = outSR;
  params.maxTracedFeatures = agsConfig.maxTracedFeatures;
  params.tolerance = agsConfig.tolerance;
  params.flowElements = traceFlowElement;
  //...

function solve(traceSolverType, params) {
  esri.request({
    url: url,
    content: params,
    callbackParamName: "callback",
    load: function (result) {
                     if (result.hasError) {
                        console.log("Error Solve - description: ${errorDescription}");
                   } else {
                   var junctionsResultFeatures = result.junctions;
                   var json = JSON.stringify(junctionsResultFeatures);
                   console.log(json);

      },
       error: function (error) {

      }
    });
   }
});

and the output in JSON out put is like below which as you can see the displayFieldName node is empty "". Can you please let me know what I am missing in the request params settings to get the displayFieldName ?

 

[  
   { 
      "displayFieldName":"",
      "fieldAliases":{ 
         "OBJECTID":"OBJECTID"
      },
      "geometryType":"esriGeometryPoint",
      "spatialReference":{ 
         "wkid":4326,
         "latestWkid":4326
      },
      "fields":[ 
         { 
            "name":"OBJECTID",
            "type":"esriFieldTypeOID",
            "alias":"OBJECTID"
         }
      ],
      "features":[ 
         { 
            "attributes":{ 
               "OBJECTID":1101
            },
            "geometry":{ 
               "x":-88.16815406499995,
               "y":41.79624553800005
            }
         }
      ]
   },
   { 
      "displayFieldName":"",
      "fieldAliases":{ 
         "OBJECTID":"OBJECTID"
      },
      "geometryType":"esriGeometryPoint",
      "spatialReference":{ 
         "wkid":4326,
         "latestWkid":4326
      },
      "fields":[ 
         { 
            "name":"OBJECTID",
            "type":"esriFieldTypeOID",
            "alias":"OBJECTID"
         }
      ],
      "features":[ 
         { 
            "attributes":{ 
               "OBJECTID":1407
            },
            "geometry":{ 
               "x":-88.16725130299994,
               "y":41.796718816000066
            }
         },
         { 
            "attributes":{ 
               "OBJECTID":1413
            },
            "geometry":{ 
               "x":-88.16639792099994,
               "y":41.79674986500004
            }
         },
         { 
            "attributes":{ 
               "OBJECTID":1414
            },
            "geometry":{ 
               "x":-88.16511888299999,
               "y":41.79660011900006
            }
         }
      ]
   }
]

Outcomes