Select to view content in your preferred language

Field Calculate Share Point Hyperlinks

312
2
2 weeks ago
Aaron_Birr
New Contributor

Lets say I have 2 pdfs in a share point folder (pdf A and pdf B), and a feature class in pro with 2 attributes (A and B). Is there a way to field calculate the share point hyperlinks into each attribute? So that the hyperlink for PDF A populates into attribute A and the hyperlink for PDF B populates into attribute B?      

0 Kudos
2 Replies
RichardDaniels
MVP Regular Contributor

Generally, when creating a hyperlink as you describe most people have an attribute field for the document name, in your case for each PDF. Hopefully, your PDF names are predictable so you can autogenerate them. For example, in my case I have stations with unique station ids while the PDFs are named like datasheet_XXXX.pdf where xyzx is the station number. Secondly, the prefix for the URL is predetermined, https://myserver/myapp/myreports.

So yes, you can then use string concatenation to build the full URL and save it as a second field. Other option is to just use the ID attribute within an Arcade expression in your Popup to build the URL.

EMani
by Esri Contributor
Esri Contributor

Hi @Aaron_Birr 

Here's a similar workflow I used to create a Status-Driven pop-up.

So your A/B attributes would be the ID field; you can ignore the Status bit, and if ID is empty, return null.

Data setup in ArcGIS Pro:

 

EMani_1-1781796518395.png

The feature class uses three key fields:

  • ID: A short text or numeric identifier for each report record
  • Status: A text field describing the record status (for example, complete or incomplete)
  • Link: A long text field that stores the fully constructed report URL

Step 1: A Calculated Field in ArcGIS Pro          

Build the report URL: You may also export this calculation for use in other projects.

EMani_2-1781796554668.png

 

Example URL where the report ID is the variable: https://www.example.com/report/1

Example Arcade expression used in the field calculation:

var status = Lower($feature.Status);

if (status == "complete") {

    return "https://www.example.com/report/" + $feature.ID;

} else {

    return null;

}

 

Note: If the variable identifier is not at the end of the URL, concatenation can be applied using:
"https://prefix" + $feature.ID + "suffix.com"

 

Status‑driven conditional links: Only records with a status of complete return a constructed URL. All other records explicitly return <Null>.

  • Evaluates record status
  • Decides whether a URL exists at all
  • Returns <Null> when conditions are not met
  • Prevents invalid links from ever being published

This status‑driven conditional logic can also be implemented using calculation attribute rules or automated Python workflows if the data updates regularly.

0 Kudos