AnsweredAssumed Answered

Field names returned from Query vs Identify

Question asked by kenbuja Champion on Apr 30, 2014
Latest reply on May 8, 2014 by geonetadmin
Why are the attributes of a feature returned from a Query shown with the field names while the attributes of a feature returned from an Identify shown with field aliases? This example lists the field names in the console for each.


I'm building the data store for dGrids two ways. In one grid, I'm getting all the records from the results of Query to show all the available features. In another grid, I'm building the data store from the results of an Identify where the user clicks on the map. Both grids have a column with an icon that indicates that there are photos at that site. The user can click on the icon to show a slideshow of the photos.

I'm using a rendercell function to create a popup window with the slideshow.

        function renderPhotoColumn(object, value, cell, options) {             if (object.PhotoCount > 0) {                 var image = new Image();                 image.src = "../resources/assets/images/CheckMark.png";                 image.onclick = function () { createSlideShow(object) };                 return image;             }         }          function createSlideShow(siteObject) {             try {                 fpSlideshow.setTitle("Site " + siteObject["Site ID"] + " photos");                  var data = [];                 for (var i = 1; i <= siteObject.PhotoCount; i++) {                      data.push({                         image: parameters.photoURL + "thumbnails/" + siteObject["Site ID"] + "_" + i + ".jpg",                         link: parameters.photoURL + siteObject["Site ID"] + "_" + i + ".jpg"                     });                 }                 Galleria.configure({                     popupLinks: true                 });       '.galleria', {                     dataSource: data                 });       ;             }              catch (e) { console.log("createSlideshow - " + e.message); }         } 

However, since the field names are not the same ("Site ID" versus "SITE_ID"), this breaks for the grid created from the Query.