Select to view content in your preferred language

How to set up hyperlink to attachments

1078
5
Jump to solution
10-19-2022 12:31 PM
dalvarez
Emerging Contributor

Hello!!

The layer I'm working with has a SERVER_PATH and Hyperlink  attributes. I want the values  of the SERVER_PATH (which are different for each asset)  to automatically  go to the end of the hyperlink.  I have all the values for the SERVER_PATH field and have been populating each hyperlink individually. Any ideas on how to do automate this process?

See below picture 

Thanks!!

 

dalvarez_0-1666207188411.png

 

0 Kudos
1 Solution

Accepted Solutions
AlfredBaldenweck
MVP Regular Contributor

There are a few different ways to do this.

  1. Field calculate it to equal the hyperlink+Serverpath (Arcade)

 

$feature.SERVER_PATH + "\\" +$feature.Hyperlink​

 

  1. if the url is always the same, then just do whatever the URL is + Serverpath

 

 "www.exampleURL.com\\" +$feature.Hyperlink​

 

  • If just for the popup, use the same Arcade expression as the popup and hide the fields you don't need.
  • AlfredBaldenweck_0-1666210415218.png

     

View solution in original post

0 Kudos
5 Replies
AlfredBaldenweck
MVP Regular Contributor

There are a few different ways to do this.

  1. Field calculate it to equal the hyperlink+Serverpath (Arcade)

 

$feature.SERVER_PATH + "\\" +$feature.Hyperlink​

 

  1. if the url is always the same, then just do whatever the URL is + Serverpath

 

 "www.exampleURL.com\\" +$feature.Hyperlink​

 

  • If just for the popup, use the same Arcade expression as the popup and hide the fields you don't need.
  • AlfredBaldenweck_0-1666210415218.png

     

0 Kudos
AlfredBaldenweck
MVP Regular Contributor

You can also set up an attribute rule for it, but I'm not familiar with how to do that.

Introduction to attribute rules—ArcGIS Pro | Documentation

Create and manage attribute rules—ArcGIS Pro | Documentation

0 Kudos
AlfredBaldenweck
MVP Regular Contributor

Good to hear.

Just a warning, it looks like you're missing a backslash between .org and Traffic

Add in "\\" to the expression to fix the links if they don't work.

0 Kudos
dalvarez
Emerging Contributor

Thanks!

this expression worked for me:  "https://wpbgisportal.wpb.org/Traffic/" + $feature.FILE_ + $feature.Hyperlink

dalvarez_0-1666295252345.png

A hyperlink was created for every asset 

dalvarez_1-1666295297331.png

 

0 Kudos
Laura
by MVP Regular Contributor
MVP Regular Contributor

My issue is backwards - wondering if anyone has insight. I need to create the Server path from the hyperlink

0 Kudos