Trying to create hyperlinks in popup from records in a related table

413
3
03-06-2023 02:21 PM
Labels (1)
KarenEllett
Occasional Contributor

I have a feature layer of lines.  There is a related table with a 1:M relationship; one line can have multiple records.  

Each related record has a drawing number as an attribute; I can build a URL from this attribute. (So, "http://www.domain.com/property=drawingnumber")

What I'm trying to do is create a line in the popup for each record that is a hyperlink.  I have been able to create an expression that adds a new line for each record, and I can get those urls in the popup as text... but not as hyperlinks. The only way I can seem to do a hyperlink is by creating individual expressions per record, which isn't feasible.  

If I could get the URL paths in the attribute table to be clickable, that would be an acceptable workaround, but so far I can only see it as plaintext.  Does anyone have any suggestions??  

 

Thank you!

0 Kudos
3 Replies
temprobertcottreau131313
Occasional Contributor II

create a hyperlink in a popup box

configure popups

temprobertcottreau131313_0-1678312561520.png

Add content

temprobertcottreau131313_1-1678312587624.png

As text

temprobertcottreau131313_3-1678312612493.png

Enter HTML code for a hyperlink in the Source window.

temprobertcottreau131313_4-1678312644438.png

temprobertcottreau131313_5-1678312684377.png

To also show fields in your popup, you'll need to enter the field names in curly brackets but in the text box not the Source window.

{fieldname1}

{fieldname2}

so that these show in the popup as well as the hyperlink.

 

0 Kudos
KarenEllett
Occasional Contributor

Unfortunately this doesn't address the issue.  This is how to create a simple hyperlink based on the feature, true.  But I need to look for all records related to this one and grab each of them; for some features that maybe 1 record, for some it may be 6.  And then for each and every one of those records, dynamically create a separate link in the popup.  So I can't go in and hard code each field name in the popup.  

For now, we've simply created one link that actually references a Flask app we've built on another server, to serve up a table with all the matching records from the table, with hyperlinks. 

0 Kudos
Keenara
New Contributor

Hi @KarenEllett, I was wondering if you were able to resolve this issue as I'm experiencing the same situation and I'd like to ask you for help. Thank you!

0 Kudos