Hi all!
I was wondering how to go about adding a hyperlink en masse to an attribute table. It would seem straight forward, but I am running into an issue.
The scenario is thus: I am trying to add a hyperlink that references another field.
www.company.com/generalinfo.aspx?ParcelID=field i need to reference here
I've tried it with ' ' and with ! ! around the field. I went to this page FAQ: Is it possible to add a hyperlink path to a field in ArcGIS Pro? and tried using this in the field calculator to no avail. I keep getting a syntax error. Any help would be greatly appreciated. Thank you!
Solved! Go to Solution.
You are building your string expression incorrectly, try:
'http://www2.alleghenycounty.us/RealEstate/GeneralInfo.aspx?ParcelID={}'.format(!LOWPARCELID!)
can you screenshot the input and error on field calculator? are you using the python interpreter when using ! !
I am trying to get this to work similarly to
However, I think they created that link within the webmap configure popup box on arc online. If i could do that en masse I would within the arc online environment, but I cannot fathom how that would be done. Hence the calculate field and just make it a part of the record.
encase it all in double quotes as your single quotes will have confused 'lowparcelid' in the string
You are building your string expression incorrectly, try:
'http://www2.alleghenycounty.us/RealEstate/GeneralInfo.aspx?ParcelID={}'.format(!LOWPARCELID!)
should the whole thing be in single or double quotes?
No. You should read up on building string expressions using Python's string.format(): string — Common string operations — Python 3.8.3 documentation
Thank you so much Joshua Bixby! that did the trick exactly!!!