I have two values, $feature.Address , $feature["URL_1"]); I would like the popup window to show the address and when the user clicks on address it goes to the url
Is there a way to do this?
Solved! Go to Solution.
Hi Jorge,
If I'm understanding your question correctly, you don't need Arcade for this. Simply set up the popup as shown in the image below. Put the names of your fields between the { }. You must have the {ADDRESS} part in the popup editor selected before you configure the link properties.
Hi Jorge,
If I'm understanding your question correctly, you don't need Arcade for this. Simply set up the popup as shown in the image below. Put the names of your fields between the { }. You must have the {ADDRESS} part in the popup editor selected before you configure the link properties.
thanks Chelsea. It works like a charm!
How do you do this in Arcade?
Hi Leo Ladefian ,
Can you elaborate about what you want to accomplish and why the solution provided by Chelsea does not work for you? Chelsea showed how you can do this without Arcade and creating Arcade expressions that will just return the field value does not make much sense.
I do not want to create a custom attribute display, all of my data are in fields. I'm not just returning the field value, it's a concatenated value from two fields. One is a hyperlink and the other is a text field. When they are combined with arcade they cease to be a hyperlink in the popup.
$feature.hyperlink + $feature.parcelid
Hi leo.ladefian_brookhavenga ,
Have you tried using "{hyperlink}{parcelid}" (without the quotes) in the URL field of the interface?
Hi Leo Ladefian, I tried doing the same thing and it seems to work for me. Let me know where I'm deviating from what you're doing.
Attributes: (strings)
firstpart = "https://www.google.com/maps/search/?api=1"
secondpart = "&query=centurylink+field"
custom arcade expression = return $feature.firstpart + $feature.secondpart
The arcade expression is the highlighted one and is appearing as a link for me in Map Viewer (not beta).
Can you provide an example of attributes you're using? Are you trying to use the Arcade in an app aside from Map Viewer?
returns as a string
It is a string. "Hyperlink" isn't a field type. Just date, double, integer, string in AGO: Add or delete a field—ArcGIS Online Help | Documentation
You may have had it set up to look like a hyperlink in ArcMap, but it is just a text/string field told to display like a hyperlink: Using Hyperlinks—Help | ArcGIS Desktop
What matters is how apps display that string. How does it appear in the actual popup in AGO?