I am using Map Viewer.
I need my pop up to show a link (not the actual url) when there is a "Yes" in the field. Here is what I have done so far, but it shows the actual url in the pop up field. What do I need to change to get it to show a link?
Solved! Go to Solution.
Hi Tim,
You can simply return the url as text without the HTML code you've got there and it will appear in the popup as a link with the default caption "View".
Alternatively what you could do is have an attribute expression that returns a text value of "Link to xx", and then add a "Text" section at the bottom of your popup referencing that expression, and add a hyperlink to the site you want to direct users to (not in the arcade expression or HTML, just using the default "add a link" part of the text editor). That way if the shelter pre-plan doesn't have a value the text/link won't appear. Hope that all makes sense, happy to elaborate if need be!
Hi Tim,
You can simply return the url as text without the HTML code you've got there and it will appear in the popup as a link with the default caption "View".
Alternatively what you could do is have an attribute expression that returns a text value of "Link to xx", and then add a "Text" section at the bottom of your popup referencing that expression, and add a hyperlink to the site you want to direct users to (not in the arcade expression or HTML, just using the default "add a link" part of the text editor). That way if the shelter pre-plan doesn't have a value the text/link won't appear. Hope that all makes sense, happy to elaborate if need be!
Thanks, this gets me in the right direction. Super helpful!
I was able to cobble this together, can you assist me with figuring out how to add "Yes" instead of "View"?
I am almost there, I think.
You could definitely accomplish that with the second part of my recommendation! Create two expressions, one that returns "No shelter plan" and one that return "Shelter plan completed" or something along those lines, then add both to a text box at the bottom and add the url that you want them to visit as a link for the "Shelter plan completed" arcade expression and no link for the "No shelter plan".
Your idea would work, but is there another way to change "View" to "Yes"?
I don't believe so no, it's been a couple years since I tried to do what you're doing but I'm pretty sure I found it was impossible, unless you formatted the whole popup as HTML.
Yes, I heard same thing. I will stay with the "View" and "No". If my client insists on having "Yes" replace "View" then I guess I will need to format whole popup as HTML. Thank you for all your valuable assistance.
No worries, glad I could help out Tim!