Hello
I have this code which bring different fields from another layer to pop up but I can't get the result on popup
var fips = $feature["parent_id"] var dd = FeatureSetByName($map, "Survey v2", ['age','gender','race'],False) var fillterSur = "survey_id = @fips" var cou = First(Filter(dd, fillterSur)) var popupTEXT = "Age: " +Text(cou,'#,###') var popupTEXT = "gender: " +Text(cou,'#,###') var popupTEXT = "race: " +Text(cou,'#,###') return popupTEXT
The result I am getting is like this :
Solved! Go to Solution.
You have to provide the appropriate field to show for each statement.
var popupTEXT = "Age: " + cou.age; //you don't need to use Text formatting in this line since the value would be "25 - 34"
var popupTEXT = "gender: " + cou.gender;
var popupTEXT = "race: " + cou.race;
If you want all three values in the same popup, this is one way of doing so
var popupTEXT = "Age: " + cou.age + TextFormatting.NewLine +
"gender: " + cou.gender + TextFormatting.NewLine +
"race: " + cou.race;
You have to provide the appropriate field to show for each statement.
var popupTEXT = "Age: " + cou.age; //you don't need to use Text formatting in this line since the value would be "25 - 34"
var popupTEXT = "gender: " + cou.gender;
var popupTEXT = "race: " + cou.race;
If you want all three values in the same popup, this is one way of doing so
var popupTEXT = "Age: " + cou.age + TextFormatting.NewLine +
"gender: " + cou.gender + TextFormatting.NewLine +
"race: " + cou.race;