HOW TO
By default, setting hyperlinks in the Layer Properties dialog box in ArcMap only allows one field in a feature class to be designated as a hyperlink field. There are a few workarounds for opening hyperlinks from multiple fields, but sometimes these do not work when attempting to open the hyperlinks simultaneously. This is especially the case when attempting to open hyperlinks pointing to a folder path versus a document or a URL at one time. However, a short script can be used to open hyperlinks from multiple fields simultaneously when selecting a feature using the Hyperlink tool.
The instructions provided describe how to create multiple field-based hyperlinks in a feature class using the Script option in the Hyperlinks settings.
function OpenLink ( [Hyperlink1], [Hyperlink2] ) { var objShell = new ActiveXObject("Shell.Application"); var path = [Hyperlink1]; objShell.ShellExecute(path, "", "", "open", 1); var objShell = new ActiveXObject("Shell.Application"); var path = [Hyperlink2]; objShell.ShellExecute(path, "", "", "open", 1); }
Note: The field names [Hyperlink1] and [Hyperlink2] must be replaced with the actual field names of the hyperlink fields from the feature class and each field name must be enclosed in square brackets [ ]. For example, if the hyperlink field names are 'Hyper_1' and 'Hyper_2', [Hyperlink1] and [Hyperlink2] from the script must be changed to [Hyper_1] and [Hyper_2].The following is an example of the HyperLink Script dialog box with the entered script code.
Get help from ArcGIS experts
Download the Esri Support App