Replacement Tokens, Fields storing URLs, and Hyperlinks not working the way I had hoped.
Hello All,
Hopefully this explanation of my dilemma is not too convoluted, but here it goes...
I have a feature service with 2 fields storing URLs to an external report. Some features/records do not not have have an external report while many do.
I would like a Hyperlink "Download Report" to the report to appear in the popup window when identifying the feature on the map BUT ONLY if the URL containing the URL is actually populated. If there is no URL - then I don't want the Hyperlink to show up.
To try to achieve this I have done the following:
- I have configured my Results List and Map Tips to come from my Feature Description
- I formatted the Feature Description using a replacement token {Report_1_Link} referencing the field containing the URL ***Note the use of replacement tokens is important because I can't hard code the HTML in the Feature Description or it will show up in the popup even if there is no report - which looks bad and is confusing for end users.
- I populated the URL field with the HTML code so that hopefully Hyperlink is recognized. ie. <a href="https://www.location.of.my.report.com">Download Report</a>
- When I test the popup, it looks like the hyperlink is there - but I can't interact with it (ie. I can't click on the link to open the report)
Any ideas if there is a solution out there?
0
-
Additionally, I've noted that ArcGIS Web Map Viewer is smart enough to convert HTML stored in a field into an actual hyperlink in the popup - but Geocortex seems to convert it to a string. 0 -
I use a replacement token to expand on a URL or use that {token} as the entire URL.
<br/><a href="https://childcaresearch.apps.lara.state.mi.us/Home/FacilityProfile/{LicenseNumber}">{LicenseNumber}</a><br/>
In the above case both the URL and clickable link are replacement tokens. Might be a solution.0 -
Thanks Trevor - I was thinking this may be a solutions (use the report name field and link it to the URL) I was just hoping to use the html in a single field because the report name can be long and look busy in the popup window. 0 -
One way to hide a tags with an empty href attribute from the maptip, is to add the following to the viewer's common.css file:
.MapTipView a[href=''] { display: none; }
or, if the info is displayed in the Results List:
.ResultsListView a[href=''] { display: none; }0 -
Thanks Berend 0 -
take a look at using arcade expressions, will need a more recent version of site manager and viewer, though. Cant lend any help though as i haven't done it in geocortex, but what you are describing is possible with arcade expressions in web appbuilder. 0
Du måste logga in om du vill lämna en kommentar.
Kommentarer
6 kommentarer