I saw some previous posts of people trying to do this and I figured out a way. You must be in a version of portal that has $userInput available.
I wanted to show a list of all features from a single layer in a single spot when you click on that spot. I have a layer of utilities engineering As Builts that overlap, three or four can cover a single intersection and I want users to have the choice to open any one of them when they click on an intersection.
I know users can "scroll" through features on a pop up but i wanted them all on a single pop up.
One of my fields is a URL field and this turns a field name into a hyperlinked URL
I would like help making the display either a table or bullet points.
they currently come through like:
Name 1975 Name 2003 Name 1982
also, "AsBuilt_Name" doesn't pull through
EDIT: Html "<br/>" breaks it into a new line, still could use some customization
var AB = FeatureSetByName($map, 'As Built Polygons')
var ABpoly = Intersects(AB, $userInput)
// uses the intersect of the click//
var result = ' '
for (var poly in ABpoly){
var link = poly.AsBuilt_Link
var name = poly.Laser_fiche_name
var yr = poly.year
var nm = poly.AsBuilt_Name
result += nm + " <a href =" + link + ">" + name + "</a>" +" " + yr + TextFormatting.NewLine
}
//pulls the fields from the layer and builds a url using the field name//
return {
type: 'text',
text : result
}