Attributes not showing in web app attribute table

3808
14
Jump to solution
05-21-2018 02:04 PM
WeatherDecision_Technologies
New Contributor

In my webapp builder application (I'm using WebApp Developer edition 2.7), I am querying a set of points that intersect a set of polygons.  I can display and toggle the intersecting points in my web app map using the layer list widget. However, the attributes of the point sub-set are not showing in the attribute table.  Thanks in advance for any insight and advice.

Cheers,

DeWayne

0 Kudos
14 Replies
WeatherDecision_Technologies
New Contributor

I did not even realize that.  Ugh!  Yes, it is one of my default widgets (along with the other widgets such as zoom slider, search, etc.) when I'm building my web app.  Sorry for the confusion. 

Yes!!!  I clicked "Filter by Extent" and I get four rows (presumably corresponding to the four points that intersect a polygon) in the table.  However, only the objectID values are shown in the table and the rest of the attributes are missing.  The "Name", "Lat" and "Lon" attributes are missing.  In addition, when I enable pop-ups on my resulting sub-set of points, the same attributes are missing their values.....they are listed in the pop-up window but the values are indeed missing.  I'm wondering if I may have the types specified incorrectly....just a guess.  But I seem to be farther along thanks to your insight.  

I will take a dive into the code that is populating my array of intersecting points that I use to build graphics and the feature collection.  I am seeing my lat and lon values (at least) as "undefined" after I create the feature layer.

Many thanks for your guidance and patience. I may come back with another question but for now I'm going to see what I can do.

All the best,

DeWayne

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

DeWayne,

   How are you adding the attribute values to your graphics fro your FeatureLayer in your code?

0 Kudos
WeatherDecision_Technologies
New Contributor

Hello, Robert.  I found my problem in my code.  I had a couple of typos and I also discovered that I was referencing an incorrect field name.

However, in answer to your question......

I create a buffer list of attributes if a point falls within my polygon:

if (polygon.contains(pnt)) {
    inBuffer2.push({
        ObjectID: layer.attributes.FID,
        Name: layer.attributes.Name,
        lon: my_pnt.x,
        lat: my_pnt.y
  });
}

then I generate my graphics:

createGraphics: function (response, callback) {
     callback(arrayUtils.map(response, function(feature, i) {
         return new Graphic(
             new Point({
                 x: feature.lon,
                 y: feature.lat
              }), null,
              {
                  FID: feature.ObjectID,
                  name: feature.Name,
                  lat: feature.lat,
                  lon: feature.lon
              },null
         );
     }))
},

 

Regards,

DeWayne

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Don't forget to mark this question as answered by clicking on the "Mark Correct" link on the reply that answered your question.

0 Kudos
WeatherDecision_Technologies
New Contributor

Indeed.  Thanks so much for your gracious help, Robert!

All the best,

DeWayne

0 Kudos