AnsweredAssumed Answered

Can't get the value for my field in my PopupTemplate

Question asked by schlot on Dec 3, 2015
Latest reply on Dec 4, 2015 by schlot

Maybe someone can spot what I'm missing.  I have a popupTemplate based on data that is from a linked table.  I am creating a pie chart.  All the values for the chart are in the join table, and from the layer, I just need county name.  Both the layer and the table are in a file geodatabase.

 

If I create a plain infoTemplate, defined as

var genericInfoTemplate = new InfoTemplate("generic", "${*}");

 

I can see all the values I want, both from the layer and the joined table.  The county name is available as county.COUNTYNAME

genericInfoTemplate.png

Here is my rest endpoint:

Layer: Veteran Population by Race - current (ID: 2)

 

Here is how I'm trying to defined my popupTemplate:

  var raceTemplate = new PopupTemplate({
    title: "{county.COUNTYNAME}: Current Veteran Population by Race",
    fieldInfos: [{ 
        fieldName: "VetPop_current_Race.EstAsianVetPop", 
        visible: true, 
        format: { places: 0 }, 
        label:"Asian" 
      },{ 
        fieldName: "VetPop_current_Race.EstBlackVetPop", 
        visible: true, 
        format: { places: 0 }, 
        label:"Black" 
      },{ 
        fieldName: "VetPop_current_Race.EstHispanicVetPop", 
        visible: true, 
        format: { places: 0 }, 
        label:"Hispanic" 
      },{ 
        fieldName: "VetPop_current_Race.EstWhiteVetPop", 
        visible: true, 
        format: { places: 0 }, 
        label:"White" 
      },{ 
        fieldName: "VetPop_current_Race.EstMultiRaceVetPop", 
        visible: true, 
        format: { places: 0 }, 
        label:"Multi-Race" 
      },{ 
        fieldName: "VetPop_current_Race.EstOtherVetPop", 
        visible: true, 
        format: { places: 0 },
        label:"Other"
    }],
    mediaInfos: [{
      type: "piechart",
      caption: "Hover to see value for each race",
        value: { 
          fields: [ 
            "VetPop_current_Race.EstMultiRaceVetPop", 
            "VetPop_current_Race.EstOtherVetPop",
            "VetPop_current_Race.EstWhiteVetPop" ,
            "VetPop_current_Race.EstBlackVetPop", 
            "VetPop_current_Race.EstHispanicVetPop",
            "VetPop_current_Race.EstAsianVetPop"


          ] ,
          theme: "PrimaryColors"
        }
      }]
});

 

popupTitle.png

 

Besides not using PopupTemplates very often, this is also the first time I've defined infoTemplates in an ArcGISDynamicMapServiceLayer using myLayername.setInfoTemplates.  I don't know if that makes any difference or not.

Outcomes