I am trying to create a script that will hyperlink to a .tiff or .pdf. These files are stored in one folder on a shared server.
I want the script to look in a field: 'PLAT_IMAGE', which has the plat number (ex: 12048-001-01) and find it's match in the folder on the shared server and then write for example:
Making the document hyperlink active in ArcMap when using Identify
My problem is that the calculation is going through and not giving me any errors but yet it's not calculating the field, so I don't know what I'm doing wrong!
import os, arcpy, fnmatch def x(PLAT_IMAGE): path = "J:\\engineering\\Asbuilts\\Plats" plat = PLAT_IMAGE for file in os.listdir(path): if os.path.isdir(os.path.join(path, file)): for file in os.listdir(os.path.join(path, file)): if fnmatch.fnmatch(file,plat + '.*'): return "\\" + "\\mercury\gisdata$\engineering\Asbuilts\Plats" + "\\" + file x( !PLAT_IMAGE! )