Select to view content in your preferred language

Configure Pop-up with Dynamic URL Hyperlink in New Web Map Viewer

7239
7
Jump to solution
10-21-2021 12:01 PM
ABishop
MVP Regular Contributor

OK... I am LOST!  In ArcGIS Online New Web Map Viewer, I am trying to use my HTML code for configuring the pop-up.  This doesn't seem to be an option now.  In the Map Viewer Classic, I had the HTML code below to configure the pop up with a URL Hyperlink to our Property Record Card.  The New Map Viewer requires that you use Arcade expressions.  How do I do this in Arcade expression? (see HTML code below)

<table>
	<tbody>
		<tr><th nowrap="nowrap">PRC: </th>
		<td><a href="https://www.pa.marion.fl.us/PRC.aspx?key={ALT_KEY}&amp;YR=2021&amp;mName=False&amp;mSitus=False" rel="nofollow ugc noopener noreferrer" target="_blank">Click Here To View</a></td>
	</tr>
</tbody></table>
Amanda Bishop, GISP
0 Kudos
1 Solution

Accepted Solutions
GIS_utahDEM
Frequent Contributor

@ABishop No problem! I haven't tried it, but I think you should be able to use some form of concatenate() to combine static strings with dynamic features using $feature.variable (which references a specific field of the feature that is being selected). https://developers.arcgis.com/arcade/function-reference/text_functions/

View solution in original post

7 Replies
JohannesLindner
MVP Frequent Contributor

New Map Viewer - Loss of HTML Pop UP Builder - Cha... - Esri Community

IT seems like custom HTML popups aren't supported yet, but they are working on it.


Have a great day!
Johannes
0 Kudos
GIS_utahDEM
Frequent Contributor

Hi! I'm not sure if this is helpful, but you can build an arcade expression referencing various features that you want in the new map viewer. 

Click Manage Expressions in the configure pop-up window, and then Add an Expression. (https://www.esri.com/about/newsroom/arcuser/arcade-4-steps/ has some basics about working with arcade, though google exactly what you're looking for with "arcade" and you'll probably find an example)

Then call the expression in the text section of the pop-up window. Below is an example I used to calculate the number of days since last edit, and then added that to the pop-up. 

0 Kudos
ABishop
MVP Regular Contributor

@GIS_utahDEM 

Thank you for your offer of help.  Yes, I know about building the expressions. I was trying to build the expression using my HTML code but it only accepts the Arcade expression format.  I looked up some Arcade functions but none of them described the type of hyperlink I am trying to insert.  It is dynamic which looks up a field value of the record and returns the website link for that record.  It currently works in our online viewer using the old Web Map Viewer, but the new one only accepts Arcade.

Amanda Bishop, GISP
0 Kudos
GIS_utahDEM
Frequent Contributor

@ABishop No problem! I haven't tried it, but I think you should be able to use some form of concatenate() to combine static strings with dynamic features using $feature.variable (which references a specific field of the feature that is being selected). https://developers.arcgis.com/arcade/function-reference/text_functions/

ABishop
MVP Regular Contributor

@GIS_utahDEM 

Thank you!  I removed the double quotes from the text format and fixed my URL and it now works!  YAY! (see attachment pic of what my pop-up looks like.  Look at the field "PRC" there is a "View" link next to it and it takes you to the property record card of the parcel)

Here is the code that finally worked:

'https:'+TextFormatting.ForwardSlash + TextFormatting.ForwardSlash+'www.pa.marion.fl.us/PRC.aspx?key='+$feature.ALT_KEY+'&YR=2021'+'&mName=False'+'&mSitus=False'

Amanda Bishop, GISP
0 Kudos
GIS_utahDEM
Frequent Contributor

Yay! Congrats, glad you got it working

0 Kudos
ABishop
MVP Regular Contributor

Thank you for the information and support!

Amanda Bishop, GISP
0 Kudos