URL in alert box not opening correctly
Hi,
I have a very simple workflow that pulls out a few specific items from the layer metadata using a web request. It is then added to an alert box for the user to view that information. I'd like to include a URL link to the metadata page but can't get it to work correctly.
At the moment I have this:
Text: ="__Description:__ " + $webRequest1.json.data.description + "\n\n__Copyright Text:__ " + $webRequest1.json.data.copyrightText + "\n\n[Metadata record]($urlText.result)"
Clicking on the resulting hyperlink directs you to: **apps.vertigisstudio.com/web/$urlText.result
If I replace $urlText.result with static text in the alert box then it works fine, but I need the hyperlink to change depending on the layer (i.e. using the urlText.result value).
Any ideas what I've missed?
-
It looks like the string is not properly set, and it now contains the literal text $urlText.result, not the value of the variable. Change it to:
="__Description:__ " + $webRequest1.json.data.description + "\n\n__Copyright Text:__ " + $webRequest1.json.data.copyrightText + "\n\n[Metadata record](" + $urlText.result + ")"or a slightly more readable format:
=`__Description:__ ${ $webRequest1.json.data.description } __Copyright Text:__ ${ $webRequest1.json.data.copyrightText } [Metadata record](${ $urlText.result })`0 -
Berend Veldkamp that's fantastic. Thanks for your help
0
Vous devez vous connecter pour laisser un commentaire.
Commentaires
2 commentaires