Select to view content in your preferred language

map viewer - need a hyperlink in pop-up window to laserfiche documents based on data stored in column in feature class

131
1
11-07-2024 09:56 AM
L77
by
Frequent Contributor

I created a feature class in Arc Pro and published it in AGOL for our surveyors to show the locations of their monuments and have the points link to the recorded survey document in our Laserfiche database online.

Here is what the table looks like in Arc Pro, note that in Arc Pro it is a hyperlink and if I click Ctrl and click on the link it will open in my web browser.

L77_0-1730999012526.png

When I published the feature class online and opened it in Map Viewer it no longer shows up as a hyperlink:

L77_1-1731000290341.png

 

If I copy and paste the link into my browser it will take me to the correct document.

Note that in the link below the only thing that will change will be the Rec Doc AFN number and that number is stored in my attribute table:

https://www.cowlitzinfo.net/WLAudPublicWorks/Search.aspx?dbid=0&repo=CCIMAGES&searchcommand={[AUD - Recorded Documents]:[Rec Doc AFN]="3753011", [Rec Doc Document Type]="SURVEY"}

In this example when I paste this link in my browser it finds the correct document but the resulting link changes to a random id number that is assigned to the document by laserfiche:

https://www.cowlitzinfo.net/WLAudPublicWorks/DocView.aspx?id=31904090&dbid=0&repo=CCIMAGES&searchid=...

The metadata for the survey shows the search criteria that is used, which is how I was able to create the link that I stored in my attribute table.

L77_2-1731000827601.png

I used Chat GPT to try to get the hyperlink to work in Arcade in Map Viewer and have been working on it for a day and a half but no matter what I try the hyperlink does not work. 

I would appreciate if someone would  please take a look at it.

Attempt 1:

First I tried clicking Add content Arcade, but no matter what I added it didn't show up in the pop up window:

L77_3-1731001025419.png

 

Next I tried clicking Options, Attribute Expressions, Add Expression and then I was able to see the link I was working on:

L77_4-1731001095008.png

When I click Run with the following code, if I copy and paste the output into my web browser it goes to the correct document.

L77_5-1731001281672.png

var afn = $feature.Rec_Doc_AFN
var url = "https://www.cowlitzinfo.net/WLAudPublicWorks/Search.aspx?dbid=0&repo=CCIMAGES&searchcommand={[AUD - Recorded Documents]:[Rec Doc AFN]=\""+ afn +"\", [Rec Doc Document Type]=\"SURVEY\"}"
 
return url

 

Output Link:

text: 'https://www.cowlitzinfo.net/WLAudPublicWorks/Search.aspx?dbid=0&repo=CCIMAGES&searchcommand={[AUD - Recorded Documents]:[Rec Doc AFN]="3753011", [Rec Doc Document Type]="SURVEY"}'

 

But when I click Done, and click on the link in the pop-up window it goes to this link instead which says " No results have been returned yet".

https://www.cowlitzinfo.net/WLAudPublicWorks/Search.aspx?dbid=0&repo=CCIMAGES&searchcommand=

 (Note that I added a text box with it linked to the expression to get it to show up in the pop-up window)

L77_7-1731001867443.png

L77_8-1731001941643.png

 

 

Attempt 2:

Next I tried creating a text box and using it to turn the column in my attribute table that contains the full document link into a hyperlink. But that didn't work either.

L77_6-1731001703129.png

 

0 Kudos
1 Reply
L77
by
Frequent Contributor

I still haven't made any progress on getting my hyperlink to work, if anyone has any advice I would appreciate it.

 

0 Kudos