Follow-up to this question Solved: Re: Relating Table A to Table D via Tables B and C - Esri Community
I got the expression working great, but it when it tries to return a field with hyperlinks E.g.
<a href="C:\Users\USER\Documents\ArcGIS\Projects\testing\Documents_testing\Lorem Ipsum.docx" target=_top">Lorem Ipsum.docx</a>
it returns a blank.
I looked into it and found this post, but I've had a lot of trouble implementing it.
I've tried making a new field with just the blank file path, then adding the html formatting to the final bit that's pushed , but that doesn't return anything either.
var docs = []
for(var a in filtered_a) {
Push(docs, "<a href="'+a.File_Path+'"</a>")
}
Is there a way to have the expression return hyperlinks?
Thanks!
Solved! Go to Solution.
Once you have your docs array, try this:
var out_str = ''
for(var d in docs){
out_str += docs[d] + ' | ' //or the separator of your choice
}
return out_str
Once you have your docs array, try this:
var out_str = ''
for(var d in docs){
out_str += docs[d] + ' | ' //or the separator of your choice
}
return out_str
That worked great!
Word for anyone who tries this in the future: Make sure that your hyperlink field includes an alias for the link, or else only your separators will show up. They will link correctly, but you won't be able to tell what they are by looking.
Thanks again!
Edit 8/12/21:
Use "<br>" if you want a new line; HTML will not take TextFormatting.NewLine