We have a user defined unique identifier string field.
Every record has an ID.
In a web server, we are storing and serving out videos/pdfs with the ID as the file name.
In the popup for a feature, the ID field value is ID123.
In AGOL, configuring a custom attribute display, I create a link, and set the url to:
Set the link text to:
Click Here for Video
I do a similar configuration for the pdf files.
In the web server, we do not have .mp4s and pdf's for every one of our ID's,
So, when the user clicks the 'Click Here for Video/PDF' link, they are taken to a 404 error page because the file is not available in the web server.
My ID's will always have attribute values, so Arcade would always show the ID field.
My intent is not to hide the ID field anyways.
The issue with using Arcade for my scenario is that I do not have a Hyperlink field in my table schema for Arcade to hide.
Furthermore, Arcade does not seem to be capable of getting header response info from the web server.
The issue I have with adding the new field to indicate whether or not the feature has files is that the directory is consistently changing (is dynamic).
People may upload new files into the directory on a daily basis.
This means that the values in my field would be outdated.
For example, ID234 might not have a file corresponding to it today, but might have a ID234.pdf in the web server virtual directory tomorrow.
This resource might be a good starting point: